This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/39383] sizeof object with zero-length array ignores initializer
- From: "joseph at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Apr 2009 22:54:13 -0000
- Subject: [Bug c/39383] sizeof object with zero-length array ignores initializer
- References: <bug-39383-1535@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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