OAR

RTEMS GNU Tools On-Line Library


Subscripting

PREV UP NEXT Bookshelf Using and Porting the GNU Compiler Collection (GCC)

4.16: Non-Lvalue Arrays May Have Subscripts

Subscripting is allowed on arrays that are not lvalues, even though the unary `&' operator is not. For example, this is valid in GNU C though not valid in other C dialects:

struct foo {int a[4];};

struct foo f();

bar (int index)
{
  return f().a[index];
}


PREV UP NEXT Bookshelf Using and Porting the GNU Compiler Collection (GCC)

Packaging copyright © 1988-2000 OAR Corporation
Context copyright by each document's author. See Free Software Foundation for information.