This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: [Bug c/16566] [3.4/3.5 Regression] ICE with flexible arrays
- From: "Joseph S. Myers" <jsm at polyomino dot org dot uk>
- To: pinskia at gcc dot gnu dot org <gcc-bugzilla at gcc dot gnu dot org>
- Cc: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 9 Aug 2004 11:23:27 +0000 (UTC)
- Subject: Re: [Bug c/16566] [3.4/3.5 Regression] ICE with flexible arrays
- References: <20040715141619.16566.ppelissi@caramail.com><20040809002652.10115.qmail@sourceware.org>
Note that this already fails with 3.2.3 if you use -std=c99 -pedantic.
Also note that though the code should be accepted, it has undefined
behavior if executed; a non-lvalue with structure with flexible array
member type is a value that does not refer to an object (other than a
temporary that disappears at the next sequence point), so members of the
flexible array can't be accessed without undefined behavior.
--
Joseph S. Myers http://www.srcf.ucam.org/~jsm28/gcc/
jsm@polyomino.org.uk (personal mail)
jsm28@gcc.gnu.org (Bugzilla assignments and CCs)