public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/48289] New: [4.5/4.6/4.7 regression] -pedantic breaks std::move
@ 2011-03-25 15:42 jason at gcc dot gnu.org
  2011-03-25 15:42 ` [Bug c++/48289] " jason at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: jason at gcc dot gnu.org @ 2011-03-25 15:42 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: [4.5/4.6/4.7 regression] -pedantic breaks std::move
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: jason@gcc.gnu.org
        ReportedBy: jason@gcc.gnu.org


>From https://bugzilla.redhat.com/show_bug.cgi?id=690548

Description of problem:

[18:03:50 pal@underdark ~/tmp/1]$ cat a.cpp
#include <utility>

class A { };

static void g ( A && ) { }

template < class T > class B {
public:
 void f ( ) {
  A a;
  g ( std :: move ( a ) );
 }
};
=================
[18:04:13 pal@underdark ~/tmp/1]$ LANG=C g++ -std=c++0x  -pedantic  -c a.cpp 
a.cpp: In member function 'void B<T>::f()':
a.cpp:11:25: error: invalid initialization of reference of type 'A&&' from
expression of type 'std::remove_reference<A&>::type'
a.cpp:5:13: error: in passing argument 1 of 'void g(A&&)'
=================
error can be fixed by removing -pedantic or by commenting out /*template <
class T > */


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

* [Bug c++/48289] [4.5/4.6/4.7 regression] -pedantic breaks std::move
  2011-03-25 15:42 [Bug c++/48289] New: [4.5/4.6/4.7 regression] -pedantic breaks std::move jason at gcc dot gnu.org
@ 2011-03-25 15:42 ` jason at gcc dot gnu.org
  2011-03-25 17:04 ` jason at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu.org @ 2011-03-25 15:42 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011.03.25 15:20:36
      Known to work|                            |4.4.6
   Target Milestone|---                         |4.5.3
     Ever Confirmed|0                           |1
      Known to fail|                            |4.5.3, 4.6.0, 4.7.0


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

* [Bug c++/48289] [4.5/4.6/4.7 regression] -pedantic breaks std::move
  2011-03-25 15:42 [Bug c++/48289] New: [4.5/4.6/4.7 regression] -pedantic breaks std::move jason at gcc dot gnu.org
  2011-03-25 15:42 ` [Bug c++/48289] " jason at gcc dot gnu.org
@ 2011-03-25 17:04 ` jason at gcc dot gnu.org
  2011-03-25 17:54 ` jason at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu.org @ 2011-03-25 17:04 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Jason Merrill <jason at gcc dot gnu.org> 2011-03-25 16:17:00 UTC ---
Author: jason
Date: Fri Mar 25 16:16:53 2011
New Revision: 171461

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=171461
Log:
    PR c++/48289
    * pt.c (build_non_dependent_expr): Keep dereferences outside the
    NON_DEPENDENT_EXPR.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/move1.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/pt.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c++/48289] [4.5/4.6/4.7 regression] -pedantic breaks std::move
  2011-03-25 15:42 [Bug c++/48289] New: [4.5/4.6/4.7 regression] -pedantic breaks std::move jason at gcc dot gnu.org
  2011-03-25 15:42 ` [Bug c++/48289] " jason at gcc dot gnu.org
  2011-03-25 17:04 ` jason at gcc dot gnu.org
@ 2011-03-25 17:54 ` jason at gcc dot gnu.org
  2011-03-28 15:58 ` jason at gcc dot gnu.org
  2011-03-29 14:38 ` jason at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu.org @ 2011-03-25 17:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> 2011-03-25 16:17:41 UTC ---
Author: jason
Date: Fri Mar 25 16:17:36 2011
New Revision: 171463

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=171463
Log:
    PR c++/48289
    * pt.c (build_non_dependent_expr): Keep dereferences outside the
    NON_DEPENDENT_EXPR.

Added:
    branches/gcc-4_5-branch/gcc/testsuite/g++.dg/cpp0x/move1.C
Modified:
    branches/gcc-4_5-branch/gcc/cp/ChangeLog
    branches/gcc-4_5-branch/gcc/cp/pt.c
    branches/gcc-4_5-branch/gcc/testsuite/ChangeLog


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

* [Bug c++/48289] [4.5/4.6/4.7 regression] -pedantic breaks std::move
  2011-03-25 15:42 [Bug c++/48289] New: [4.5/4.6/4.7 regression] -pedantic breaks std::move jason at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2011-03-25 17:54 ` jason at gcc dot gnu.org
@ 2011-03-28 15:58 ` jason at gcc dot gnu.org
  2011-03-29 14:38 ` jason at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu.org @ 2011-03-28 15:58 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> 2011-03-28 15:06:32 UTC ---
Author: jason
Date: Mon Mar 28 15:06:28 2011
New Revision: 171607

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=171607
Log:
        Revert:
        PR c++/48289
        * pt.c (build_non_dependent_expr): Keep dereferences outside the
        NON_DEPENDENT_EXPR.

Removed:
    branches/gcc-4_5-branch/gcc/testsuite/g++.dg/cpp0x/move1.C
Modified:
    branches/gcc-4_5-branch/gcc/cp/ChangeLog
    branches/gcc-4_5-branch/gcc/cp/pt.c
    branches/gcc-4_5-branch/gcc/testsuite/ChangeLog


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

* [Bug c++/48289] [4.5/4.6/4.7 regression] -pedantic breaks std::move
  2011-03-25 15:42 [Bug c++/48289] New: [4.5/4.6/4.7 regression] -pedantic breaks std::move jason at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2011-03-28 15:58 ` jason at gcc dot gnu.org
@ 2011-03-29 14:38 ` jason at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu.org @ 2011-03-29 14:38 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|4.5.3                       |4.6.1

--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> 2011-03-29 14:35:50 UTC ---
Fixed for 4.6.1.  This patch alone wasn't enough to fix the bug in 4.5, so I'm
not going to try to fix it there.


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

end of thread, other threads:[~2011-03-29 14:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-25 15:42 [Bug c++/48289] New: [4.5/4.6/4.7 regression] -pedantic breaks std::move jason at gcc dot gnu.org
2011-03-25 15:42 ` [Bug c++/48289] " jason at gcc dot gnu.org
2011-03-25 17:04 ` jason at gcc dot gnu.org
2011-03-25 17:54 ` jason at gcc dot gnu.org
2011-03-28 15:58 ` jason at gcc dot gnu.org
2011-03-29 14:38 ` jason at gcc dot gnu.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).