Sebastian Redl wrote:
>
> 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.

Yeah, good question. For:

const int n=2;
int x[n+3];

it seems more appropriate for C++ to fold the type of 'x' into int[5].
Later on, in order to be able to find the 'n' reference in the AST, 
"n+3" expression could be added in the (previously discussed) 
'TypeSpecifier' node in the AST.

-Argiris

>
> 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