[PATCH 15/18] move REAL_IDENTIFIER_TYPE_VALUE to be a field of lang_identifier

Joseph S. Myers joseph@codesourcery.com
Fri Mar 11 14:41:00 GMT 2011


On Fri, 11 Mar 2011, Jason Merrill wrote:

> On 03/10/2011 11:23 PM, Nathan Froyd wrote:
> > I'm not overly fond of the conditionals (especially in error_operand_p)
> > but I don't think it's reasonable to make IDENTIFIER_NODE bigger and
> > penalize the other FEs just because the C++ FE is playing games with
> > TREE_TYPE.
> 
> The C++ FE expects that we can check the TREE_TYPE of anything that appears as
> an expression, and uses IDENTIFIER_NODE to indicate a dependent name within
> templates.  If you want to break TREE_TYPE on IDENTIFIER_NODE, you need to
> change the representation of dependent names so that we can continue to use
> TREE_TYPE on all expressions.

There's a longstanding ambition to give identifiers a static type other 
than "tree".  That would tend to suggest a representation such as 
DEPENDENT_NAME_EXPR (a tree wrapping an identifier).

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Gcc-patches mailing list