diff options
author | Nathan Sidwell <nathan@acm.org> | 1999-10-04 15:13:26 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 1999-10-04 15:13:26 +0000 |
commit | ce7695e001e0109d9dc5f74f747acefd8267468f (patch) | |
tree | f382ba4aee25389cefd0b3c3edf170475a71635a /gcc/cp | |
parent | d38e58a5ab4b0c75a4845f7e570dcced5ca905ac (diff) | |
download | gcc-ce7695e001e0109d9dc5f74f747acefd8267468f.zip gcc-ce7695e001e0109d9dc5f74f747acefd8267468f.tar.gz gcc-ce7695e001e0109d9dc5f74f747acefd8267468f.tar.bz2 |
decl2.c (grok_alignof): Don't decay lvalues.
* decl2.c (grok_alignof): Don't decay lvalues.
* init.c (build_new): Remove unused variable.
From-SVN: r29805
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/decl2.c | 12 | ||||
-rw-r--r-- | gcc/cp/init.c | 6 |
3 files changed, 7 insertions, 17 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index ff9137b..0588f0d 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +1999-10-04 Nathan Sidwell <nathan@acm.org> + + * decl2.c (grok_alignof): Don't decay lvalues. + + * init.c (build_new): Remove unused variable. + 1999-10-04 Mark Mitchell <mark@codesourcery.com> * cp-tree.h (struct language_function): Remove static_labelno. diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index b3cdad4..e128e8c 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -1050,17 +1050,7 @@ grok_alignof (expr) return c_alignof (TREE_TYPE (TREE_TYPE (best))); } else - { - /* ANSI says arrays and fns are converted inside comma. - But we can't convert them in build_compound_expr - because that would break commas in lvalues. - So do the conversion here if operand was a comma. */ - if (TREE_CODE (expr) == COMPOUND_EXPR - && (TREE_CODE (TREE_TYPE (expr)) == ARRAY_TYPE - || TREE_CODE (TREE_TYPE (expr)) == FUNCTION_TYPE)) - expr = default_conversion (expr); - return c_alignof (TREE_TYPE (expr)); - } + return c_alignof (TREE_TYPE (expr)); } /* Create an ARRAY_REF, checking for the user doing things backwards diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 0bd2740..83fd8c5 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -1895,8 +1895,6 @@ build_new (placement, decl, init, use_global_new) tree nelts = NULL_TREE, t; int has_array = 0; - tree pending_sizes = NULL_TREE; - if (decl == error_mark_node) return error_mark_node; @@ -2054,10 +2052,6 @@ build_new (placement, decl, init, use_global_new) rval = build1 (NOP_EXPR, TREE_TYPE (rval), rval); TREE_NO_UNUSED_WARNING (rval) = 1; - if (pending_sizes) - rval = build_compound_expr (chainon (pending_sizes, - build_expr_list (NULL_TREE, rval))); - return rval; } |