You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is actually not standard C99 but rather a gnu extension. You also get a warning if you compile it with -pedantic and -std=c99 for both gcc and clang.
bschommer
changed the title
Support for extensible structures ending with empty-length arrays
Support for gnu extension flexible array initializer
Jan 28, 2019
Example code:
This is a common idiom used at the end of structures, making their size variable. This is the expected output on GCC or Clang:
With CompCert 3.4, it doesn't compile:
error: initializer element is not a compile-time constant (wrong number of elements in array initializer)
The text was updated successfully, but these errors were encountered: