summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgiovannibajo <giovannibajo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-01-14 04:50:30 +0000
committergiovannibajo <giovannibajo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-01-14 04:50:30 +0000
commit2b40dfcef885a18d81d0cedfa850e71d44114dab (patch)
tree464d20d7a8b954407e03cfc3c174070a7afc6456
parent4a4e98d252420809cb102a83b95c3b7c4dde5062 (diff)
downloadppe42-gcc-2b40dfcef885a18d81d0cedfa850e71d44114dab.tar.gz
ppe42-gcc-2b40dfcef885a18d81d0cedfa850e71d44114dab.zip
PR c++/12335
* parser.c (cp_parser_lookup_name): Return error_mark_node if there is no destructor while looking up a BIT_NOT_EXPR. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75842 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/parser.c2
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 5c7220d4570..bd48e17c37f 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
+
+ PR c++/12335
+ * parser.c (cp_parser_lookup_name): Return error_mark_node if there
+ is no destructor while looking up a BIT_NOT_EXPR.
+
2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
* cxxfilt.c: Remove unused file.
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 3de7c1d86d3..a44ebe49e5f 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -13367,6 +13367,8 @@ cp_parser_lookup_name (cp_parser *parser, tree name,
/* If that's not a class type, there is no destructor. */
if (!type || !CLASS_TYPE_P (type))
return error_mark_node;
+ if (!CLASSTYPE_DESTRUCTORS (type))
+ return error_mark_node;
/* If it was a class type, return the destructor. */
return CLASSTYPE_DESTRUCTORS (type);
}
OpenPOWER on IntegriCloud