This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/15218] [DR 421] rvalue.field is not an lvalue


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]