summaryrefslogtreecommitdiff
path: root/gcc/cp/init.c
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2004-05-28 22:35:50 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2004-05-28 22:35:50 +0000
commita133b234d21c1c2be38d3b5539177289914a21f5 (patch)
treed7752dce6835b6a0c7641ac819b1894315e25a16 /gcc/cp/init.c
parent52401a44fb50829b79b04b677866cec680d94024 (diff)
downloadgcc-a133b234d21c1c2be38d3b5539177289914a21f5.tar.gz
PR c++/15083
* decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR, even in a templat.e * init.c (build_new): Likewise. PR c++/15640 * name-lookup.c (arg_assoc): Robustify. PR c++/15471 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup when determining the scope to use for a pointer to member. PR c++/15083 * g++.dg/warn/noeffect5.C: New test. PR c++/15471 * g++.dg/expr/ptrmem4.C: New test. PR c++/15640 * g++.dg/template/operator3.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82391 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/init.c')
-rw-r--r--gcc/cp/init.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index 8cf0019cfab..1c003566108 100644
--- a/gcc/cp/init.c
+++ b/gcc/cp/init.c
@@ -1788,6 +1788,7 @@ build_new (tree placement, tree decl, tree init, int use_global_new)
rval = build_min (NEW_EXPR, build_pointer_type (type),
placement, t, init);
NEW_EXPR_USE_GLOBAL (rval) = use_global_new;
+ TREE_SIDE_EFFECTS (rval) = 1;
return rval;
}