aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorBrendan Kehoe <brendan@cygnus.com>1998-08-25 18:52:45 +0000
committerBrendan Kehoe <brendan@gcc.gnu.org>1998-08-25 14:52:45 -0400
commit8e710788f53e0795287b4d66515df1fd6e4ccfa0 (patch)
treeedece713a9e98da279f565cb4edf90fda3a42c75 /gcc
parentc3a3b536472eef9287eb2706fd03496147a9577f (diff)
downloadgcc-8e710788f53e0795287b4d66515df1fd6e4ccfa0.zip
gcc-8e710788f53e0795287b4d66515df1fd6e4ccfa0.tar.gz
gcc-8e710788f53e0795287b4d66515df1fd6e4ccfa0.tar.bz2
pt.c (tsubst_copy): Only do typename overloading on an IDENTIFIER_NODE that happens to look like a...
* 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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/pt.c5
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index dfb6e51..80ba077 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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...
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index f817896..3f9dccc 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -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