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: 5 Mar 2009 13:53:02 -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 #4 from joseph at codesourcery dot com 2009-03-05 13:53 -------
Subject: Re: sizeof object with zero-length array ignores
initializer
On Thu, 5 Mar 2009, ebotcazou at gcc dot gnu dot org wrote:
> ------- Comment #3 from ebotcazou at gcc dot gnu dot org 2009-03-05 13:31 -------
> > No, the case is an extension to C. 6.5.3.4 was obviously written without this
> > case in mind.
>
> Not at all, see 6.7.2.1 (16):
Standard C does not permit initializing the flexible array member.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39383