]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: re PR c++/14810 (tree check failures with invalid code involving templates)
authorVolker Reichelt <reichelt@igpm.rwth-aachen.de>
Tue, 4 May 2004 00:21:38 +0000 (00:21 +0000)
committerVolker Reichelt <reichelt@gcc.gnu.org>
Tue, 4 May 2004 00:21:38 +0000 (00:21 +0000)
Backport:
2004-04-01  Mark Mitchell  <mark@codesourcery.com>
PR c++/14810
* decl.c (maybe_push_cleanup_level): Robustify.

From-SVN: r81464

gcc/cp/ChangeLog
gcc/cp/decl.c

index e5f90d9e8a1bcab0683cf1950c60e799897573da..86f60c9ac28bb1df3b4a8e14eb0f45b94ad39713 100644 (file)
@@ -1,3 +1,10 @@
+2004-05-04  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
+
+       Backport:
+       2004-04-01  Mark Mitchell  <mark@codesourcery.com>
+       PR c++/14810
+       * decl.c (maybe_push_cleanup_level): Robustify.
+
 2004-05-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
 
        Backport from gcc-3_4-branch
index e17254ef4f3db0e4ef1d3bfd4613a868661cf858..7cdf893527112a38920e0255fc5387f9889622da 100644 (file)
@@ -1075,7 +1075,8 @@ void
 maybe_push_cleanup_level (type)
      tree type;
 {
-  if (TYPE_HAS_NONTRIVIAL_DESTRUCTOR (type)
+  if (type != error_mark_node
+      && TYPE_HAS_NONTRIVIAL_DESTRUCTOR (type)
       && current_binding_level->more_cleanups_ok == 0)
     {
       keep_next_level (2);