This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/53196] unknown struct name in C99 compound initializer doesn't generate error


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53196

--- Comment #4 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2012-05-02 19:59:46 UTC ---
On Wed, 2 May 2012, redi at gcc dot gnu.org wrote:

> Also, to be valid C the initializer should be { 0 }, allowing an empty
> initializer is a GNU C extension.

And indeed, with -std=c99 -pedantic-errors GCC rejects the C code for that 
reason.  The more specific error should certainly be detected, though.  
See also bug 51034, a previous report again involving incomplete types in 
compound literals.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]