diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-08-19 08:01:50 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-08-19 08:01:50 +0000 |
commit | ef1a5b81ae684f1ebfd0b7ef66f902ad93321a0b (patch) | |
tree | 116009208203aacb356d1646709739f9ef141289 /gcc/cp/pt.c | |
parent | b2eb8213910e3a57b1019fc8b851d6b2e42a6954 (diff) | |
download | gcc-ef1a5b81ae684f1ebfd0b7ef66f902ad93321a0b.tar.gz |
PR c++/17041
* pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
from input for MODOP_EXPR.
testsuite:
* g++.dg/Wparentheses-3.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86241 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r-- | gcc/cp/pt.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 4107d1ca1c6..f4e9362ff1b 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -7667,6 +7667,7 @@ tsubst_copy (tree t, tree args, tsubst_flags_t complain, tree in_decl) (code, tsubst_copy (TREE_OPERAND (t, 0), args, complain, in_decl), tsubst_copy (TREE_OPERAND (t, 1), args, complain, in_decl), tsubst_copy (TREE_OPERAND (t, 2), args, complain, in_decl)); + TREE_NO_WARNING (r) = TREE_NO_WARNING (t); return r; } @@ -8331,10 +8332,14 @@ tsubst_copy_and_build (tree t, return cxx_sizeof_or_alignof_expr (op1, TREE_CODE (t)); case MODOP_EXPR: - return build_x_modify_expr - (RECUR (TREE_OPERAND (t, 0)), - TREE_CODE (TREE_OPERAND (t, 1)), - RECUR (TREE_OPERAND (t, 2))); + { + tree r = build_x_modify_expr + (RECUR (TREE_OPERAND (t, 0)), + TREE_CODE (TREE_OPERAND (t, 1)), + RECUR (TREE_OPERAND (t, 2))); + TREE_NO_WARNING (r) = TREE_NO_WARNING (t); + return r; + } case ARROW_EXPR: op1 = tsubst_non_call_postfix_expression (TREE_OPERAND (t, 0), |