3.7.6. Compound literals

As in C99, compound literals are supported. All compound literals are lvalues.


int y[] = (int []) {1, 2, 3}; // error in strict C99, okay in C99 --gnu
int z[] = (int [3]) {1};


Supported in GNU mode for C90 and C99 only.


Compound literals can also be used as initializers in C99. However, the compiler is more relaxed about which compound literals it accepts as initializers in GNU mode than it is when compiling C99 source code.

Copyright © 2007, 2010 ARM Limited. All rights reserved.ARM DUI 0348A