aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorGiovanni Bajo <giovannibajo@gcc.gnu.org>2004-01-14 04:50:30 +0000
committerGiovanni Bajo <giovannibajo@gcc.gnu.org>2004-01-14 04:50:30 +0000
commitfd6e3cce4e11266fbcde37ac264fc11c222cdf1a (patch)
tree464d20d7a8b954407e03cfc3c174070a7afc6456 /gcc/cp
parent070ce57b9526cf19d545ed56a9f4a2475a2c9261 (diff)
downloadgcc-fd6e3cce4e11266fbcde37ac264fc11c222cdf1a.zip
gcc-fd6e3cce4e11266fbcde37ac264fc11c222cdf1a.tar.gz
gcc-fd6e3cce4e11266fbcde37ac264fc11c222cdf1a.tar.bz2
re PR c++/12335 (ICE when explicitly calling destructor)
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. From-SVN: r75842
Diffstat (limited to 'gcc/cp')
-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 5c7220d..bd48e17 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 3de7c1d..a44ebe4 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);
}