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/39383] sizeof object with zero-length array ignores initializer



------- Comment #9 from joseph at codesourcery dot com  2009-04-08 22:54 -------
Subject: Re:  sizeof object with zero-length array ignores
 initializer

On Wed, 8 Apr 2009, b07584 at freescale dot com wrote:

> ------- Comment #8 from b07584 at freescale dot com  2009-04-08 21:36 -------
> > Standard C does not permit initializing the flexible array member.
> > 
> 
>  However, (using revision 145360) with -std=c99, the given code compiles
>  - no error is issued.

If you want an error use -pedantic-errors.


-- 


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


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