Controls the acceptance of GNU C language extensions.
#pragma gcc_extensions on | off | reset
If you enable this pragma, the compiler accepts GNU C extensions in C source code. This includes the following non-ANSI C extensions:
int foo(int arg) { int arr[2] = { arg, arg+1 }; }
#pragma gcc_extensions on #define POW2(n) ({ int i,r; for(r=1,i=n; i>0; --i) r<<=1; r;}) int main() { return POW2(4); }
This feature only works for expressions in function bodies.
This pragma does not correspond to any setting in the Language panel. To check the global optimizer, use __option (gcc_extensions), described in Checking Pragma Settings. By default, this pragma is disabled.