diff options
author | Jason Merrill <jason@redhat.com> | 2002-08-02 07:57:22 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2002-08-02 07:57:22 -0400 |
commit | a77a9a18c058d41eeb634e6c6a6f56d9bae04d55 (patch) | |
tree | 72cdfa1019e7a95a9c990b7e0b9711b69f589e01 /gcc/expr.c | |
parent | 367aa58580632b0bef67f5bbcc41009eb8a09381 (diff) | |
download | gcc-a77a9a18c058d41eeb634e6c6a6f56d9bae04d55.zip gcc-a77a9a18c058d41eeb634e6c6a6f56d9bae04d55.tar.gz gcc-a77a9a18c058d41eeb634e6c6a6f56d9bae04d55.tar.bz2 |
langhooks-def.h (LANG_HOOKS_EXPR_SIZE): New macro.
* langhooks-def.h (LANG_HOOKS_EXPR_SIZE): New macro.
* langhooks.c (lhd_expr_size): Define default.
* langhooks.h (struct lang_hooks): Add expr_size.
* explow.c (expr_size): Call it.
* expr.c (store_expr): Don't copy an expression of size zero.
(expand_expr) [CONSTRUCTOR]: Use expr_size to calculate how much
to store.
* Makefile.in (builtins.o): Depend on langhooks.h.
* cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
(cp_expr_size): New fn.
* call.c (build_over_call): Lose empty class hackery.
(convert_arg_to_ellipsis): Promote non-POD warning to error.
* typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
From-SVN: r55983
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -4241,6 +4241,8 @@ store_expr (exp, target, want_value) || (temp != target && (side_effects_p (temp) || side_effects_p (target)))) && TREE_CODE (exp) != ERROR_MARK + /* If there's nothing to copy, don't bother. */ + && expr_size (exp) != const0_rtx && ! dont_store_target /* If store_expr stores a DECL whose DECL_RTL(exp) == TARGET, but TARGET is not valid memory reference, TEMP will differ @@ -6810,8 +6812,7 @@ expand_expr (exp, target, tmode, modifier) * TYPE_QUAL_CONST))), 0, TREE_ADDRESSABLE (exp), 1); - store_constructor (exp, target, 0, - int_size_in_bytes (TREE_TYPE (exp))); + store_constructor (exp, target, 0, INTVAL (expr_size (exp))); return target; } |