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: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 May 2004 01:24:55 -0000
- Subject: [Bug c++/15218] [DR 421] rvalue.field is not an lvalue
- References: <20040430023835.15218.pinskia@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bangerth at dealii dot org 2004-05-05 01:24 -------
Confirmed. We don't even give a warning about taking the
address of a temporary :-(
This is what I get from icc:
g/x> icc -Xc -ansi -c x.cc
x.cc(9): warning #592: variable "a" is used before its value is set
return a;
^
x.cc(14): error: expression must be an lvalue or a function designator
int* p = &f().a; // should reject as rvalue.field is still an rvalue
^
compilation aborted for x.cc (code 2)
W.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-05-05 01:24:54
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15218