From fd6e3cce4e11266fbcde37ac264fc11c222cdf1a Mon Sep 17 00:00:00 2001 From: Giovanni Bajo Date: Wed, 14 Jan 2004 04:50:30 +0000 Subject: [PATCH] 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 --- gcc/cp/ChangeLog | 6 ++++++ gcc/cp/parser.c | 2 ++ 2 files changed, 8 insertions(+) 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 + + 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 * 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); } -- 2.7.4