This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/15218] New: [DR 421] rvalue.field is not an lvalue
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Apr 2004 02:38:37 -0000
- Subject: [Bug c++/15218] New: [DR 421] rvalue.field is not an lvalue
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
>From DR 421 <http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/cwg_defects.html#421>:
typedef
struct {
int a;
} A;
A f(void)
{
A a;
return a;
}
int main(void)
{
int* p = &f().a; // should reject as rvalue.field is still an rvalue
}
--
Summary: [DR 421] rvalue.field is not an lvalue
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Keywords: accepts-invalid
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15218