From: Mark Mitchell Date: Thu, 1 Apr 2004 20:02:07 +0000 (+0000) Subject: re PR c++/14810 (tree check failures with invalid code involving templates) X-Git-Tag: releases/gcc-4.0.0~9083 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bb8b4ed64bb646eba1794984c0f7de9e4fb5f241;p=thirdparty%2Fgcc.git re PR c++/14810 (tree check failures with invalid code involving templates) PR c++/14810 * name-lookup.c (maybe_push_cleanup_level): Robustify. From-SVN: r80315 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 4a6f648f3149..93d368425299 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2004-04-01 Mark Mitchell + + PR c++/14810 + * name-lookup.c (maybe_push_cleanup_level): Robustify. + 2004-04-01 Richard Kenner * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly. diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index 612a7c171e7d..52d4d770ba82 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -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);