On Thu, Sep 12, 2013 at 12:58 PM, Aaron Ballman <[email protected]>wrote:
> So declarations are a bit more hairy. It seems that GCC allows static > initalization of flexible array members as an extension: > http://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html We don't support that extension. :) And if we did, we could just not warn on declarations using that extension. > > Also, the C standard itself shows a declaration of a value type using > a flexible array member (granted, it is to show what could be > undefined behavior): > > 6.7.2.1p19 (ISO/IEC 9899:2011): > > struct s { int n; double d[]; }; > struct s t1 = { 0 }; // valid > struct s t2 = { 1, { 4.2 }}; // invalid > t1.n = 4; // valid > t1.d[0] = 4.2; // might be undeļ¬ned behavior > I don't think this indicates anything. -Eli
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
