This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [www] c99 update
- To: Richard Henderson <rth at twiddle dot net>
- Subject: Re: [www] c99 update
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Date: Sat, 13 Jan 2001 22:29:14 +0000 (GMT)
- cc: <gcc-patches at gcc dot gnu dot org>
On Thu, 4 Jan 2001, Richard Henderson wrote:
> -<li>Flexible array members are supported internally using GCC's
> -zero-length array extension, which has fewer semantic restrictions.
> -Thus conforming programs may be compiled, but non-conforming
> -programs may not be properly diagnosed.</li>
It seems the constraints on flexible array members still aren't getting
fully checked. At least, the requirement (see 6.7.2.1p2) that such a
structure shall not be an element of an array isn't getting checked.
e.g.
struct foo { int a; int b[]; } x[10];
doesn't receive a diagnostic with -std=c99 -pedantic.
--
Joseph S. Myers
jsm28@cam.ac.uk