diff options
author | Mark Mitchell <mark@codesourcery.com> | 2004-04-01 20:02:07 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2004-04-01 20:02:07 +0000 |
commit | bb8b4ed64bb646eba1794984c0f7de9e4fb5f241 (patch) | |
tree | 367a18757529daf2b08adc4abb61d128d0e94e8a | |
parent | 2b6b5c35ce58090c8e1b6a5438e6cce3263000da (diff) | |
download | gcc-bb8b4ed64bb646eba1794984c0f7de9e4fb5f241.zip gcc-bb8b4ed64bb646eba1794984c0f7de9e4fb5f241.tar.gz gcc-bb8b4ed64bb646eba1794984c0f7de9e4fb5f241.tar.bz2 |
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
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/name-lookup.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 4a6f648..93d3684 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -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. diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index 612a7c1..52d4d77 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); |