On 03/11/2011 11:23 AM, Nathan Froyd wrote:
Hm.  OK.  Just as a light sketch of how this would all work, where do
DEPENDENT_NAME_EXPRs get introduced into the AST?  During parsing, or
someplace else?

During parsing, yes, wherever we look up a name and currently return the plain identifier rather than a decl.

What about those cases where the FE does TREE_TYPE
(DECL_NAME (X))--are those supposed to be REAL_IDENTIFIER_TYPE_VALUE

Kind of.  It seems like there are two uses:

1) Remembering that we've seen a declaration of a type with this name.
2) Remembering which type a particular tinfo or conversion op name corresponds to.

It probably makes sense for #2 to use a new and different macro.

There's also cases like:

--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -1011,7 +1011,7 @@ dump_decl (tree t, int flags)
      {
        pp_cxx_ws_string (cxx_pp, "operator");
         /* Not exactly IDENTIFIER_TYPE_VALUE.  */
-       dump_type (TREE_TYPE (t), flags);
+       dump_type (REAL_IDENTIFIER_TYPE_VALUE (t), flags);
         break;
      }
     else

That's #2.

Jason

Reply via email to