This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/57531] lvalue required with comma operator
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 05 Jun 2013 15:36:07 +0000
- Subject: [Bug c++/57531] lvalue required with comma operator
- Auto-submitted: auto-generated
- References: <bug-57531-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57531
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|c |c++
Severity|major |normal
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I think the problem is the comma operator causes it to be a rvalue. In that
((void)0, x) is considered rvalue rather than what you want as a lvalue.
Note C does not have ?: as lvalues so this cannot apply to C; only C++.