From: Giovanni Bajo Date: Wed, 14 Jan 2004 04:50:30 +0000 (+0000) Subject: re PR c++/12335 (ICE when explicitly calling destructor) X-Git-Tag: releases/gcc-3.4.0~1000 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fd6e3cce4e11266fbcde37ac264fc11c222cdf1a;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 5c7220d45700..bd48e17c37f8 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 3de7c1d86d35..a44ebe49e5f6 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); }