pt.c (tsubst_copy): Only do typename overloading on an IDENTIFIER_NODE that happens...
authorBrendan Kehoe <brendan@cygnus.com>
Tue, 25 Aug 1998 18:52:45 +0000 (18:52 +0000)
committerBrendan Kehoe <brendan@gcc.gnu.org>
Tue, 25 Aug 1998 18:52:45 +0000 (14:52 -0400)
* pt.c (tsubst_copy): Only do typename overloading on an
IDENTIFIER_NODE that happens to look like a typename if it actually
has a type for us to use.
avoid problems w/ SGI STL headers that have variables like __opr or __op1

From-SVN: r21978

gcc/cp/ChangeLog
gcc/cp/pt.c

index dfb6e518be7bdeee496896ab5e12aae0f5e6e158..80ba077e5ddfc9a984c0bc22e6afc3844329e92b 100644 (file)
@@ -1,3 +1,9 @@
+1998-08-25  Brendan Kehoe  <brendan@cygnus.com>
+
+       * pt.c (tsubst_copy): Only do typename overloading on an
+       IDENTIFIER_NODE that happens to look like a typename if it actually
+       has a type for us to use.
+
 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
 
        * typeck.c (comp_cv_target_types): Split out...
index f817896981fdb211d3e3b99ab5db5e0f4e6300fd..3f9dccc8cdbe5ea7fedd2bf07bfe7030163d16fb 100644 (file)
@@ -5971,7 +5971,10 @@ tsubst_copy (t, args, in_decl)
       return tsubst (t, args, in_decl);
 
     case IDENTIFIER_NODE:
-      if (IDENTIFIER_TYPENAME_P (t))
+      if (IDENTIFIER_TYPENAME_P (t)
+         /* Make sure it's not just a variable named `__opr', for instance,
+            which can occur in some existing code.  */
+         && TREE_TYPE (t))
        return build_typename_overload
          (tsubst (TREE_TYPE (t), args, in_decl));
       else