+2004-05-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ Backport from gcc-3_4-branch:
+ 2004-03-30 Mark Mitchell <mark@codesourcery.com>
+ PR c++/14724
+ * decl.c (start_decl_1): Do not decide whether or not to create a
+ new cleanup level until after the type has been completed.
+
2004-04-01 Richard Henderson <rth@redhat.com>
PR c++/14804
if (type == error_mark_node)
return;
- maybe_push_cleanup_level (type);
-
if (initialized)
/* Is it valid for this decl to have an initializer at all?
If not, set INITIALIZED to zero, which will indirectly
if (! initialized)
DECL_INITIAL (decl) = NULL_TREE;
+
+ /* Create a new scope to hold this declaration if necessary.
+ Whether or not a new scope is necessary cannot be determined
+ until after the type has been completed; if the type is a
+ specialization of a class template it is not until after
+ instantiation has occurred that TYPE_HAS_NONTRIVIAL_DESTRUCTOR
+ will be set correctly. */
+ maybe_push_cleanup_level (type);
}
/* Handle initialization of references. DECL, TYPE, and INIT have the