[PATCH] Fix PR C++/28989, post-increment of bool is wrongly considered a lvalue
Andrew Pinski
pinskia@physics.uc.edu
Tue Sep 26 15:35:00 GMT 2006
On Mon, 2006-09-18 at 13:42 -0700, Mark Mitchell wrote:
> Does it work to make lvaluep look through SAVE_EXPRs to the thing saved,
> instead?
Actually that is the real issue that we are looking through SAVE_EXPRs
when they are not be lvalues as they either references an early
SAVE_EXPRs' value or just a place holder for a rvalue.
This patches changes SAVE_EXPRs to be not lvalues in the function
lvalue_p_1 and it fixes the regression.
OK? Bootstrapped and tested with no regressions.
Thanks,
Andrew Pinski
cp/ChangeLog:
* tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
lvalues.
testsuite/ChangeLog:
* g++.dg/expr/lval3.C: New test.
* g++.dg/expr/lval4.C: New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fixpr28989.diff.txt
Type: text/x-patch
Size: 1140 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20060926/f774e0d3/attachment.bin>
More information about the Gcc-patches
mailing list