summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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