summaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2007-08-17 22:14:47 +0000
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2007-08-17 22:14:47 +0000
commitd9547f280ab8dd3165e9a0c65fabb3197f2c0133 (patch)
tree5c639966a9d46c89da269609ea2c6dd0aab42506 /gcc/cp
parentd45e1e6e1a18f6716de168b35aa594666410a7e1 (diff)
downloadgcc-d9547f280ab8dd3165e9a0c65fabb3197f2c0133.tar.gz
2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR c++/28989 * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never lvalues. 2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com> PR c++/28989 * g++.dg/expr/lval3.C: New test. * g++.dg/expr/lval4.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127603 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/tree.c3
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 9556496041f..3fd17c4f191 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
+
+ PR c++/28989
+ * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
+ lvalues.
+
2007-08-17 Ollie Wild <aaw@google.com>
PR c++/31749
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index 792f1fd0909..1d16f2c860a 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -92,11 +92,12 @@ lvalue_p_1 (tree ref,
switch (TREE_CODE (ref))
{
+ case SAVE_EXPR:
+ return clk_none;
/* preincrements and predecrements are valid lvals, provided
what they refer to are valid lvals. */
case PREINCREMENT_EXPR:
case PREDECREMENT_EXPR:
- case SAVE_EXPR:
case TRY_CATCH_EXPR:
case WITH_CLEANUP_EXPR:
case REALPART_EXPR: