https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101836

--- Comment #18 from Martin Sebor <msebor at gcc dot gnu.org> ---
The zero size case exists (and is documented) solely as a substitute for
flexible array members.  Treating is as an ordinary array would disable that
extension.  It might be appropriate to provide a separate option to control it
but conflating it with the other cases (one or more elements) doesn't seem like
the robust design.

As I mentioned in the review of the Clang change,
https://reviews.llvm.org/D126864, so that code bases that use some larger
number of elements than zero, such as one, and that can't easily change, can
still benefit from the BOS enhancement for the remaining cases, it would be
helpful for the new option to accept the minimum number of elements at which a
trailing array ceases to be considered a poor-man's flexible array member.

Reply via email to