This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] PR c++/15264


The following patch for the 3.3 branch fixes some tree checking failures
caused by invalid C++ code.

The patch is a backport of Mark's patch
http://gcc.gnu.org/ml/gcc-cvs/2004-04/msg00122.html

Bootstrapped and regtested.
Approved by Gaby ( http://gcc.gnu.org/ml/gcc-bugs/2004-05/msg00248.html ).
Committed to 3.3 branch.

Regards,
Volker


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.


Index: decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/decl.c,v
retrieving revision 1.965.2.82
diff -u -p -r1.965.2.82 decl.c
--- decl.c	1 May 2004 19:57:28 -0000	1.965.2.82
+++ decl.c	4 May 2004 00:09:47 -0000
@@ -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);
===================================================================



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]