OSDN Git Service

PR c++/12335
authorgiovannibajo <giovannibajo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 14 Jan 2004 04:50:30 +0000 (04:50 +0000)
committergiovannibajo <giovannibajo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 14 Jan 2004 04:50:30 +0000 (04:50 +0000)
* parser.c (cp_parser_lookup_name): Return error_mark_node if there
is no destructor while looking up a BIT_NOT_EXPR.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75842 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/parser.c

index 5c7220d..bd48e17 100644 (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.
index 3de7c1d..a44ebe4 100644 (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);
     }