c99 VLA semantics

Joseph S. Myers joseph@codesourcery.com
Wed Jun 21 21:43:00 GMT 2006


On Wed, 21 Jun 2006, Mike Stump wrote:

> On Jun 16, 2006, at 2:58 PM, Joseph S. Myers wrote:
> > On Fri, 16 Jun 2006, Mike Stump wrote:
> > > Oh, and on another topic, the web pages that say that we don't do C99 VLA
> > > types I think can be cleaned up with the recent work.
> > 
> > The status now would be bug 19771 plus various obscure cases relating to
> > when side effects in array size expressions are allowed and when VLA types
> > should be allowed outside of functions.
> 
> Not sure exactly how you want it represented in the web page, how's the below
> patch?

We should at least fix bug 19771 before claiming "Done".

I don't think people are likely to use the side-effects in such cases as

  (void)(int (*)[++i])p;

but I'd still rather we made an effort to ensure that the side-effects in 
type names did take place when required.  I also think that

static size_t s = sizeof(int (*)[a]);

is clearly legitimate outside a function.  (I can file bugs for these 
issues if you'd like.)

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Gcc-patches mailing list