aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>1999-09-26 18:16:47 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>1999-09-26 18:16:47 +0000
commit2aa3110af4fe912b83644650f1543541def23372 (patch)
treea7a875228ef9fa48b5f78cbadaba1c9110467ccb /gcc/cp
parentd43163b742fbb74f35c006c99c364c52c6803561 (diff)
downloadgcc-2aa3110af4fe912b83644650f1543541def23372.zip
gcc-2aa3110af4fe912b83644650f1543541def23372.tar.gz
gcc-2aa3110af4fe912b83644650f1543541def23372.tar.bz2
decl.c (start_function): Set x_dont_save_pending_sizes rather than calling get_pending_sizes.
* decl.c (start_function): Set x_dont_save_pending_sizes rather than calling get_pending_sizes. * init.c (build_new): Don't save and restore immediate_size_expand; instead, assert that it has the expected value already. From-SVN: r29669
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog8
-rw-r--r--gcc/cp/decl.c2
-rw-r--r--gcc/cp/init.c18
3 files changed, 11 insertions, 17 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 6e3e16e..0b30ff3 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,11 @@
+1999-09-26 Mark Mitchell <mark@codesourcery.com>
+
+ * decl.c (start_function): Set x_dont_save_pending_sizes rather
+ than calling get_pending_sizes.
+ * init.c (build_new): Don't save and restore
+ immediate_size_expand; instead, assert that it has the expected
+ value already.
+
1999-09-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* lex.c (compiler_error): Add missing call to va_end().
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index d5da38f..3da610d 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -12915,7 +12915,7 @@ start_function (declspecs, declarator, attrs, flags)
We haven't necessarily assigned RTL to all variables yet, so it's
not safe to try to expand expressions involving them. */
immediate_size_expand = 0;
- get_pending_sizes ();
+ current_function->x_dont_save_pending_sizes_p = 1;
/* Let the user know we're compiling this function. */
if (processing_template_decl || !building_stmt_tree ())
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index 19d8c74..d420ff5 100644
--- a/gcc/cp/init.c
+++ b/gcc/cp/init.c
@@ -1909,14 +1909,10 @@ build_new (placement, decl, init, use_global_new)
{
tree absdcl = TREE_VALUE (decl);
tree last_absdcl = NULL_TREE;
- int old_immediate_size_expand = 0;
if (current_function_decl
&& DECL_CONSTRUCTOR_P (current_function_decl))
- {
- old_immediate_size_expand = immediate_size_expand;
- immediate_size_expand = 0;
- }
+ my_friendly_assert (immediate_size_expand == 0, 19990926);
nelts = integer_one_node;
@@ -1980,17 +1976,7 @@ build_new (placement, decl, init, use_global_new)
type = groktypename (decl);
if (! type || type == error_mark_node)
- {
- immediate_size_expand = old_immediate_size_expand;
- return error_mark_node;
- }
-
- if (current_function_decl
- && DECL_CONSTRUCTOR_P (current_function_decl))
- {
- pending_sizes = get_pending_sizes ();
- immediate_size_expand = old_immediate_size_expand;
- }
+ return error_mark_node;
}
else if (TREE_CODE (decl) == IDENTIFIER_NODE)
{