On Tue, 17 Oct 2017, Nathan Sidwell wrote: > On 10/17/2017 05:26 AM, Richard Biener wrote: > > > Sorry for not looking at the patch before replying. The patch looks ok > > but shouldn't LANG_TYPE be also handled by the FE? LANG_TYPE itself > > is an odd beast if I may say that - it's only used by the C++ and Ada FEs > > and the Ada FE does only > > I agree. I think LANG_TYPE may be from when there were no FE-specific nodes. > It should probably be killed and resurrected as appropriate FE nodes. > > Olivier, as an ADA person, is that something that could be done? > > > Thus the patch is ok. > > Thanks, > > As a heads up, we currently have: > > struct type_common; > struct type_with_lang_specific : type_common; > struct type_non_common : type_with_lang_specific; > > And many (most?, all?) FE type nodes derive from type_non_common (even if, as > I discovered, they don't know it). It seems the hierarchy would be better as: > > struct type_common; > struct type_non_common : type_common; // FE type derive here > struct type_with_lang_specific : type_non_common; > > After all, why would a FE-specific type need a lang-specific pointer? I don't > think there are types that just have the land-pointer and don't have > non_common. > > That's the direction I'm heading in with this clean up.
Not sure. For decls the lang_specific pointer is even in decl_common! It's probably that there are basically no types w/o a FE using the lang-specific pointer but there are some types using type_common fields only (but need lang-specifics). So maybe do like with decls and remove type_with_lang_specific, instead folding it into type_common? Richard. -- Richard Biener <rguent...@suse.de> SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg)