[cfe-dev] Better type-specifier representation
Argiris Kirtzidis
akyrtzi at gmail.com
Sat Sep 13 15:02:34 PDT 2008
Daniel Dunbar wrote:
> In my opinion, the owner of the expression should most certainly be the
> declaration. In fact, I'm not even sure it is correct for the size expression
> to be in the type, but I haven't taken the time to fully understand VLA
> rules and the interaction with what gcc accepts yet.
>
> I'm fairly certain that this issue is independent of the type specifier one,
> however.
>
Isn't the ownership issue similar to the RecordDecl ownership issue
that the proposed TypeSpecifier node solves ?
e.g:
x = sizeof(int[y+10]); // who owns "y+10" ?
How about having the TypeSpecifier node own these expressions ?
sizeof(int[y+10]) -> sizeof(TypeSpecifier) -> TypeSpecifier owns "y+10"
-Argiris
More information about the cfe-dev
mailing list