re PR c++/14810 (tree check failures with invalid code involving templates)
authorMark Mitchell <mark@codesourcery.com>
Thu, 1 Apr 2004 20:02:07 +0000 (20:02 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Thu, 1 Apr 2004 20:02:07 +0000 (20:02 +0000)
PR c++/14810
* name-lookup.c (maybe_push_cleanup_level): Robustify.

From-SVN: r80315

gcc/cp/ChangeLog
gcc/cp/name-lookup.c

index 4a6f648f314957eae698dc869b7157fb6967d742..93d3684252993d445ec5342c6291ac04723a005d 100644 (file)
@@ -1,3 +1,8 @@
+2004-04-01  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/14810
+       * name-lookup.c (maybe_push_cleanup_level): Robustify.
+
 2004-04-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
 
        * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
index 612a7c171e7df475476ef3f818b2e3a7f032347d..52d4d770ba8266e7a896576effac7b0b2509263f 100644 (file)
@@ -1407,7 +1407,8 @@ innermost_nonclass_level (void)
 void
 maybe_push_cleanup_level (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)
     {
       begin_scope (sk_cleanup, NULL);