On Tue, Apr 05, 2011 at 05:55:33PM +0200, Michael Matz wrote: > I have a preference in having just one DECL_RTL field for conceptual > reasons: > > Most DECLs are actually objects (there are some prominent exceptions, but > those always would be better described with something like NAMED_ENTITY, > if we had something like that, namespaces and translation_unit would > qualify). All these have a RTL representation, so one field for them > seems appropriate. That some of those don't have a size (either because > size makes no sense or is always available via type size) hints towards a > problem in the inheritance. I would think it should look like so: > > decl_common {} # no size, no rtl, no align, no pt_uid > decl_with_rtl : decl_common { > # add rtl, align, pt_uid > } > decl_with_size : decl_with_rtl { > # add size, size_unit > } > > Then decl_common can still be used for > imported_decl/namespace/translation_unit; objects > are at least decl_with_rtl, and some objects will be decl_with_size.
This is what I was heading for, but I hadn't fully worked out how to switch around the inheritance structure. Thanks! Consider this patch dropped, then; I'll work towards something like the above instead. -Nathan