Next:Pointer Arith, Previous:Escaped Newlines, Up:C Extensions [Contents][Index]
In ISO C99, arrays that are not lvalues still decay to pointers, andmay be subscripted, although they may not be modified or used afterthe next sequence point and the unary ‘&’ operator may not beapplied to them. As an extension, GNU C allows such arrays to besubscripted in C90 mode, though otherwise they do not decay topointers outside C99 mode. For example,this is valid in GNU C though not valid in C90:
struct foo {int a[4];};struct foo f();bar (int index){ return f().a[index];}