[cfe-dev] clang bug: constant array size is recognized as variable array size
freeman1 at gmail.com
Mon May 26 11:52:07 PDT 2008
Eli Friedman wrote:-
> > On Fri, May 23, 2008 at 3:17 AM, Csaba Hruska <csaba.hruska at gmail.com>
> > > gcc accepts it, but clang thows this:
> > > error: variable length array declared outside of any function
> > gcc is wrong here; "(unsigned int)(100.*120.)" isn't an integer
> > constant expression (per the definition in C99 6.6), so A is in fact
> > an illegal VLA per the standard. Not sure what to do here.
Perhaps it could use a better diagnostic, like:
error: array declared outside of function without integer constant length
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev