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
This commit is contained in:
Giovanni Bajo 2004-01-14 04:50:30 +00:00
parent 070ce57b95
commit fd6e3cce4e
2 changed files with 8 additions and 0 deletions

View File

@ -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.

View File

@ -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);
}