diff options
author | Roger Sayle <roger@eyesopen.com> | 2004-09-21 16:20:12 +0000 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2004-09-21 16:20:12 +0000 |
commit | d211a298ce7c5ff8b34323e0575480fc9f80ada9 (patch) | |
tree | bdfafe1c2a29f4aa6bfe3cb981e141f67ff30e50 /libjava/jni.cc | |
parent | f0c721ad7cc43cb007beb8a55cb088f17a2a065b (diff) | |
download | gcc-d211a298ce7c5ff8b34323e0575480fc9f80ada9.zip gcc-d211a298ce7c5ff8b34323e0575480fc9f80ada9.tar.gz gcc-d211a298ce7c5ff8b34323e0575480fc9f80ada9.tar.bz2 |
re PR c++/7503 ((x < Y ? X : Y) used for assignment causes wrong code)
PR c++/7503
* tree.c (lvalue_p_1): Disallow MIN_EXPR and MAX_EXPR as lvalues
if either operand has side-effects.
* typeck.c (rationalize_conditional_expr): Assert that neither
operand of MIN_EXPR or MAX_EXPR has side-effects.
(build_modify_expr): Add support for MIN_EXPR and MAX_EXPR.
Check that the "lhs" is a valid lvalue, i.e. that neither operand
of a MIN_EXPR or MAX_EXPR has a side-effect.
* g++.dg/opt/pr7503-1.C: New testcase for COND_EXPR lvalues.
* g++.dg/opt/pr7503-2.C: New testcase for <? and >? lvalues.
* g++.dg/opt/pr7503-3.C: New testcase for invalid <? lvalue errors.
* g++.dg/opt/pr7503-4.C: New testcase for <?= and >?= assignments.
* g++.dg/opt/pr7503-5.C: New testcase for side-effects with <?=.
From-SVN: r87810
Diffstat (limited to 'libjava/jni.cc')
0 files changed, 0 insertions, 0 deletions