Questions about a constant array reference in the C++ front end

Stefan Strasser sstrasser@systemhaus-gruppe.de
Sun May 8 14:41:00 GMT 2005


Kazu Hirata schrieb:
> I am trying to fold array[7] into 2.  It turns out that if T is an
> ARRAY_REF,
> 
>   TREE_READONLY (TREE_OPERAND (T, 0))
> 
> is 0.  Why?  

I don't know anything about fold but in general a c++ array in the 
frontend is cv-qualified, not its elements.

> Another question.  How is a RANGE_EXPR used in a C++'s array
> constructor?  The CONSTRUCTOR section of tree.def says
> 
> I created an array with more than one thousand elements.  I still did
> not see a RANGE_EXPR in the array's CONSTRUCTOR.  How do I get a
> RANGE_EXPR in a CONSTRUCTOR?
> 

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.


Regards,

-- 
Stefan Strasser



More information about the Gcc mailing list