https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101836
--- Comment #33 from James Y Knight <foom at fuhm dot net> --- (In reply to qinzhao from comment #32) > there is a Bugzilla that has been filed for GCC to request the same warning > for GCC: > https://gcc.gnu.org/bugzilla//show_bug.cgi?id=94428 > > -Wzero-length-array Great. Adding that flag, and eliminating the -fstrict-flex-arrays=3 option from this proposal would be good. > As suggested by Siddhesh in comment#23, -Wstrict-flex-arrays might be > necessary to be added too, and > -Wzero-length-array will be an alias to > -Wstrict-flex-arrays=3 I don't understand what the -Wstrict-flex-arrays warning and its multiple levels is proposed to actually do. Is it supposed to warn on the structs that change behavior in the corresponding -fstrict-flex-array=LEVEL? But that would mean -Wstrict-flex-arrays=1 would warn on any array at the end of a struct which has a size other than 0 or 1. That's clearly not going to be actually practical...so perhaps you had something else in mind?