public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/15218] [DR 421] rvalue.field is not an lvalue
       [not found] <bug-15218-4@http.gcc.gnu.org/bugzilla/>
@ 2011-09-29 11:17 ` paolo.carlini at oracle dot com
  0 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-09-29 11:17 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15218

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|gcc-bugs at gcc dot gnu.org |
         Resolution|                            |FIXED

--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-09-29 10:57:40 UTC ---
All the snippets are rejected in mainline (would be 4.7), all but Comment 3 in
4.6.x too.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/15218] [DR 421] rvalue.field is not an lvalue
       [not found] <bug-15218-6528@http.gcc.gnu.org/bugzilla/>
  2009-01-16 20:33 ` pinskia at gcc dot gnu dot org
  2010-02-08 12:11 ` dibeas at ieee dot org
@ 2010-04-23 16:01 ` wb at fnal dot gov
  2 siblings, 0 replies; 5+ messages in thread
From: wb at fnal dot gov @ 2010-04-23 16:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from wb at fnal dot gov  2010-04-23 16:00 -------
Created an attachment (id=20472)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20472&action=view)
test case; incorrectly compiles


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15218


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/15218] [DR 421] rvalue.field is not an lvalue
       [not found] <bug-15218-6528@http.gcc.gnu.org/bugzilla/>
  2009-01-16 20:33 ` pinskia at gcc dot gnu dot org
@ 2010-02-08 12:11 ` dibeas at ieee dot org
  2010-04-23 16:01 ` wb at fnal dot gov
  2 siblings, 0 replies; 5+ messages in thread
From: dibeas at ieee dot org @ 2010-02-08 12:11 UTC (permalink / raw)
  To: gcc-bugs



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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/15218] [DR 421] rvalue.field is not an lvalue
       [not found] <bug-15218-6528@http.gcc.gnu.org/bugzilla/>
@ 2009-01-16 20:33 ` pinskia at gcc dot gnu dot org
  2010-02-08 12:11 ` dibeas at ieee dot org
  2010-04-23 16:01 ` wb at fnal dot gov
  2 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-01-16 20:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2009-01-16 20:33 -------
*** Bug 38870 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |stefan dot constantin at
                   |                            |gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15218


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/15218] [DR 421] rvalue.field is not an lvalue
  2004-04-30  3:46 [Bug c++/15218] New: " pinskia at gcc dot gnu dot org
@ 2004-05-05  1:24 ` bangerth at dealii dot org
  0 siblings, 0 replies; 5+ messages in thread
From: bangerth at dealii dot org @ 2004-05-05  1:24 UTC (permalink / raw)
  To: gcc-bugs


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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-09-29 10:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-15218-4@http.gcc.gnu.org/bugzilla/>
2011-09-29 11:17 ` [Bug c++/15218] [DR 421] rvalue.field is not an lvalue paolo.carlini at oracle dot com
     [not found] <bug-15218-6528@http.gcc.gnu.org/bugzilla/>
2009-01-16 20:33 ` pinskia at gcc dot gnu dot org
2010-02-08 12:11 ` dibeas at ieee dot org
2010-04-23 16:01 ` wb at fnal dot gov
2004-04-30  3:46 [Bug c++/15218] New: " pinskia at gcc dot gnu dot org
2004-05-05  1:24 ` [Bug c++/15218] " bangerth at dealii dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).