On Wed, 08 Oct 2008 22:20:31 -0000, Argiris Kirtzidis <[EMAIL PROTECTED]>
wrote:
> class C {
>   static const int number = 50;
>   static int arr[number];
> };
> 
> Here's how it worked:
> -GetTypeForDeclarator was called from both Sema::ActOnCXXMemberDeclarator
> and Sema::ActOnDeclarator.
> -VariableArrayTypes are not uniqued so two VariableArrayTypes were
created
> with the same DeclRefExpr.

Why would this create a VariableArrayType anyway? The inline-initialized
static const int is a constant expression and should create a variable 
of known size.

Or are all arrays whose size references an expression considered 
variable for the sake of preserving the source expression?

Sebastian
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to