[Bug c++/15218] [DR 421] rvalue.field is not an lvalue
bangerth at dealii dot org
gcc-bugzilla@gcc.gnu.org
Wed May 5 01:24:00 GMT 2004
------- 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
More information about the Gcc-bugs
mailing list