This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/15218] [DR 421] rvalue.field is not an lvalue
- From: "dibeas at ieee dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Feb 2010 12:11:27 -0000
- Subject: [Bug c++/15218] [DR 421] rvalue.field is not an lvalue
- References: <bug-15218-6528@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from dibeas at ieee dot org 2010-02-08 12:11 -------
Also related: dereferencing a data member pointer with an lvalue incorrectly
yields an lvalue:
struct X { int x; };
X f();
void g() {
int X::*ptr = &X::x;
f().*ptr = 5; // should not compile!
}
--
dibeas at ieee dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dibeas at ieee dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15218