[cfe-dev] Better type-specifier representation
Eli Friedman
eli.friedman at gmail.com
Sat Sep 13 12:33:51 PDT 2008
On Sat, Sep 13, 2008 at 12:04 PM, Mike Stump <mrs at apple.com> wrote:
>> Nevertheless, should we treat these as VLAs in the ASTs?
>
> I propose that we treat VLAs as VLAs and non-VLAs by a name other than
> VLA?! I shudder to think anyone would want something different.
> Surely I must misunderstand something.
If I recall correctly, in C++, in "const int i = 10; int a[i];", the
declaration of a is valid (and not a VLA) because "i" is a constant
expression (as opposed to C99, where it is a VLA).
In any case, I can't figure out what owns the expression in the
braces; I wouldn't be surprised if it leaks.
-Eli
More information about the cfe-dev
mailing list