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

--- Comment #17 from Kees Cook <kees at outflux dot net> ---
(In reply to qinzhao from comment #16)
> additional work are needed in order to make this task complete:
> 
> 1. add one more new gcc option:
> 
> -fstrict-flex-arrays
> 
> when it's on, only treat the following cases as flexing array:
> 
> trailing array with size 0;
> trailing array with size 1;
> trailing flexible array;
> 
> all other trailing arrays with size > 1 will be treated as normal arrays. 

Under -fstrict-flex-arrays, arrays of size 0 and 1 should *not* be treated as
flex arrays. Only "[]" should be a flexible array. Everything else should be
treated as having the literal size given.

Reply via email to