]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/12335 (ICE when explicitly calling destructor)
authorGiovanni Bajo <giovannibajo@gcc.gnu.org>
Wed, 14 Jan 2004 04:50:30 +0000 (04:50 +0000)
committerGiovanni Bajo <giovannibajo@gcc.gnu.org>
Wed, 14 Jan 2004 04:50:30 +0000 (04:50 +0000)
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
gcc/cp/parser.c

index 5c7220d4570091779a661fa97339e868de514575..bd48e17c37f84df73254196cf8f96ad5ace7c7c3 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 3de7c1d86d357300b9e6e6737bba98fd912d71bb..a44ebe49e5f634af90b85e33f26a57aa04931f18 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);
     }