[Bug c++/68978] [6 Regression] bogus error: lvalue required as left operand of assignment
ppalka at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Dec 18 17:01:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68978
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |ppalka at gcc dot gnu.org
--- Comment #2 from Patrick Palka <ppalka at gcc dot gnu.org> ---
It looks like lvalue_kind() does not handle MODOP_EXPRs correctly. It does not
consider (i *= radix) (encoded at that point as an unlowered MODOP_EXPR) to be
an lvalue. I am testing this fix:
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index ae176d0..ac22e45 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -186,6 +186,7 @@ lvalue_kind (const_tree ref)
break;
case MODIFY_EXPR:
+ case MODOP_EXPR:
case TYPEID_EXPR:
return clk_ordinary;
More information about the Gcc-bugs
mailing list