This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [tree-ssa] Misc C++ improvements


On Fri, 21 Mar 2003 12:27:40 -0700, law at redhat dot com wrote:

>  >>   2. Apparently in C++ you can get a TYPE_DECL with a field which refers
>  >>      back to the TYPE_DECL (it happens in the testsuite somewhere).
>  >
>  >I don't understand why we're walking into TYPE_DECLs at all.  Shouldn't
>  >that be RECORD_TYPE (et al) instead?

> You have a toplevel TYPE_DECL, which has a RECORD_TYPE which refers back 
> to the toplevel TYPE_DECL.

Yes, all classes have a nested TYPE_DECL referring to the class itself.
But my question remains: Why does the VLA code care about TYPE_DECLs?  We
should only be interested in the types of local variables, specifically
either ARRAY_TYPEs or RECORD_TYPEs which contain FIELD_DECLs of ARRAY_TYPE
(or RECORD_TYPE, etc.).  There's no reason to look at TYPE_DECLs at all.

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]