Questions about a constant array reference in the C++ front end
Stefan Strasser
sstrasser@systemhaus-gruppe.de
Sun May 8 20:27:00 GMT 2005
Nathan Sidwell schrieb:
> Stefan Strasser wrote:
>
>
>>I don't know anything about fold but in general a c++ array in the
>>frontend is cv-qualified, not its elements.
>
>
> this is untrue. the elements hold the qualification.
right
>
>
>>I have been processing large source codes including STL, boost and
>>custom code including function bodies and I have never seen a
>>RANGE_EXPR. I suppose it's only used at later stages or only in other
>>language's frontends.
>
>
> Incorrect. RANGE_EXPRs get generated during processing of an array's
> initializer -- very early on in the C++ FE.
>
as said there have not been one case in large sources.
> I can't recall exactly. It might be for default initialization.
> Something like
> ptr = new int[100] ();
...does not initialize anything
int ar[]={0,0,0,0}; does, but not with RANGE_EXPR
--
Stefan Strasser
More information about the Gcc
mailing list