public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/57211] New: wrong line indicated in warning for synthesized method
@ 2013-05-08 13:08 doko at gcc dot gnu.org
  2013-05-15  5:38 ` [Bug c++/57211] " anthony.foiani at gmail dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: doko at gcc dot gnu.org @ 2013-05-08 13:08 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 57211
           Summary: wrong line indicated in warning for synthesized method
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: doko@gcc.gnu.org


seen at least in 4.6, 4.7, 4.8 and trunk:

$ g++-4.8 -c -std=c++11 -Wunused-parameter  test.cpp
test.cpp:3:8: warning: unused parameter 'p' [-Wunused-parameter]
 struct A  // line pointed-to by warning
        ^
test.cpp: In function 'int main()':
test.cpp:21:11: note: synthesized method 'A& A::operator=(A&&)' first required
here 
         b = std::move(a);
           ^

$ cat test.cpp 
#include <functional>

struct A  // line pointed-to by warning
{
        struct B
        {
                B& operator=(B&&) { return *this; }
        };

        B f;

        A() = default;
        A& operator=(A&& p) = default;  // where the method is declared
};

int main()
{
        A a;
        A b;

        b = std::move(a);
}


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

end of thread, other threads:[~2013-05-22  9:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-08 13:08 [Bug c++/57211] New: wrong line indicated in warning for synthesized method doko at gcc dot gnu.org
2013-05-15  5:38 ` [Bug c++/57211] " anthony.foiani at gmail dot com
2013-05-15  5:40 ` anthony.foiani at gmail dot com
2013-05-22  1:11 ` paolo.carlini at oracle dot com
2013-05-22  9:34 ` paolo.carlini at oracle dot com

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