public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/35153]  New: Taking address of result of calling function returning rvalue reference should not compile.
@ 2008-02-10  8:36 gcc-bugzilla at contacts dot eelis dot net
  2008-02-15 19:55 ` [Bug c++/35153] " dgregor at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: gcc-bugzilla at contacts dot eelis dot net @ 2008-02-10  8:36 UTC (permalink / raw)
  To: gcc-bugs

Consider:

  int && f();
  void g() { &(f()); }

GCC accepts, but shouldn't, because by 5.3.1p2 (in n2461) the operand of unary
& must be an lvalue, and by 5p6 (f()) is an rvalue.

I'm using g++ (GCC) 4.3.0 20080106 (experimental).


-- 
           Summary: Taking address of result of calling function returning
                    rvalue reference should not compile.
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: gcc-bugzilla at contacts dot eelis dot net


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


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

* [Bug c++/35153] Taking address of result of calling function returning rvalue reference should not compile.
  2008-02-10  8:36 [Bug c++/35153] New: Taking address of result of calling function returning rvalue reference should not compile gcc-bugzilla at contacts dot eelis dot net
@ 2008-02-15 19:55 ` dgregor at gcc dot gnu dot org
  2008-02-16  3:39 ` andreasmeier80 at gmx dot de
  2008-12-02 17:58 ` jason at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: dgregor at gcc dot gnu dot org @ 2008-02-15 19:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from dgregor at gcc dot gnu dot org  2008-02-15 19:55 -------
After discussing this with Howard Hinnant, we agree that it is a bug. I'll
handle it.


-- 

dgregor at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |dgregor at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-02-15 19:55:06
               date|                            |


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


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

* [Bug c++/35153] Taking address of result of calling function returning rvalue reference should not compile.
  2008-02-10  8:36 [Bug c++/35153] New: Taking address of result of calling function returning rvalue reference should not compile gcc-bugzilla at contacts dot eelis dot net
  2008-02-15 19:55 ` [Bug c++/35153] " dgregor at gcc dot gnu dot org
@ 2008-02-16  3:39 ` andreasmeier80 at gmx dot de
  2008-12-02 17:58 ` jason at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: andreasmeier80 at gmx dot de @ 2008-02-16  3:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from andreasmeier80 at gmx dot de  2008-02-16 03:39 -------
Patch at http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00584.html


-- 


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


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

* [Bug c++/35153] Taking address of result of calling function returning rvalue reference should not compile.
  2008-02-10  8:36 [Bug c++/35153] New: Taking address of result of calling function returning rvalue reference should not compile gcc-bugzilla at contacts dot eelis dot net
  2008-02-15 19:55 ` [Bug c++/35153] " dgregor at gcc dot gnu dot org
  2008-02-16  3:39 ` andreasmeier80 at gmx dot de
@ 2008-12-02 17:58 ` jason at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: jason at gcc dot gnu dot org @ 2008-12-02 17:58 UTC (permalink / raw)
  To: gcc-bugs



-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|dgregor at gcc dot gnu dot  |unassigned at gcc dot gnu
                   |org                         |dot org
             Status|ASSIGNED                    |NEW


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


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

end of thread, other threads:[~2008-12-02 17:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-10  8:36 [Bug c++/35153] New: Taking address of result of calling function returning rvalue reference should not compile gcc-bugzilla at contacts dot eelis dot net
2008-02-15 19:55 ` [Bug c++/35153] " dgregor at gcc dot gnu dot org
2008-02-16  3:39 ` andreasmeier80 at gmx dot de
2008-12-02 17:58 ` jason at gcc dot gnu 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).