https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101836
--- Comment #26 from Siddhesh Poyarekar <siddhesh at gcc dot gnu.org> --- (In reply to qinzhao from comment #25) > So, based on all the discussion so far, how about the following: > > ** add the following gcc option: > > -fstrict-flex-arrays=[0|1|2|3] > > when -fstrict-flex-arrays=0: > treat all trailing arrays as flexible arrays. the default behavior; Wouldn't this be -fno-strict-flex-arrays, i.e. the current behaviour? > when -fstrict-flex-arrays=1: > Only treating [], [0], and [1] as flexible array; > > when -fstrict-flex-arrays=2: > Only treating [] and [0] as flexible array; > > when -fstrict-flex-arrays=3: > Only treating [] as flexible array; The strictest level. If yes, then you end up having: -fstrict-flex-arrays=[1|2|3] with, I suppose, 1 as the default based on Jakub's comment about maximum compatibility support.