VLA/VM [*] bug fixes for C
Joseph S. Myers
joseph@codesourcery.com
Wed May 10 19:07:00 GMT 2006
On Wed, 10 May 2006, Mike Stump wrote:
> On May 8, 2006, at 2:30 PM, Joseph S. Myers wrote:
> > > void foo11(typeof (int (*)(int o[*])) i);
> >
> > I think that's valid gnu99.
>
> Speaking of typeof, should typeof (vla) follow the same rules as for sizeof
> (vla)? vla, evaluate, otherwise, no eval.
typeof should evaluate its argument iff variably modified. Thus typeof
should evaluate a pointer to VLA argument, whereas sizeof only evaluates
VLAs themselves. That's the conclusion I arrived at and put in a comment
in gnu99-static-1.c.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Gcc
mailing list