[Bug debug/86985] Generated DWARF does not distinguish between zero-length and flexible array types
osandov at osandov dot com
gcc-bugzilla@gcc.gnu.org
Fri Aug 17 05:26:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86985
--- Comment #3 from Omar Sandoval <osandov at osandov dot com> ---
They are not equivalent in GCC, see
https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html. In particular, flexible
arrays cannot be the only member in a struct, cannot be a member of a union,
cannot be used as a dimension of a multidimensional array, and can have a
static initializer with elements; the opposite is true for zero length arrays.
More information about the Gcc-bugs
mailing list