This is the mail archive of the gcc-patches@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]

Re: [www] c99 update


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


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