public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/39866]  New: [c++0x] deleted functions not removed from "no match" error messages
@ 2009-04-23 13:04 sylvain dot pion at sophia dot inria dot fr
  2009-10-05 21:52 ` [Bug c++/39866] " sylvain dot pion at sophia dot inria dot fr
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: sylvain dot pion at sophia dot inria dot fr @ 2009-04-23 13:04 UTC (permalink / raw)
  To: gcc-bugs

The following program :
=================================
struct A {
        A& operator=(const A&) = delete;

        void operator=(int) {}
        void operator=(char) {}
};

struct B {};

int main()
{
        A a;
        a = B(); // no match
        a = 1.0; // ambiguous
}
==============================

produces, with g++ -std=c++0x, current trunk version, the following
two error messages :

test_note_deleted_function.cpp: In function 'int main()':
test_note_deleted_function.cpp:13: error: no match for 'operator=' in 'a = B()'
test_note_deleted_function.cpp:2: note: candidates are: A& A::operator=(const
A&)
test_note_deleted_function.cpp:4: note:                 void A::operator=(int)
test_note_deleted_function.cpp:5: note:                 void A::operator=(char)
test_note_deleted_function.cpp:14: error: ambiguous overload for 'operator=' in
'a = 1.0e+0'
test_note_deleted_function.cpp:4: note: candidates are: void A::operator=(int)
test_note_deleted_function.cpp:5: note:                 void A::operator=(char)


Note how the deleted assignment operator is listed as candidate in the
"no match" error.  It should probably be removed.

The "ambiguous overload" case does not mention it as candidate, which I think
is the right thing to do.


-- 
           Summary: [c++0x] deleted functions not removed from "no match"
                    error messages
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sylvain dot pion at sophia dot inria dot fr
  GCC host triplet: i386-apple-darwin9.6.0


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


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

* [Bug c++/39866] [c++0x] deleted functions not removed from "no match" error messages
  2009-04-23 13:04 [Bug c++/39866] New: [c++0x] deleted functions not removed from "no match" error messages sylvain dot pion at sophia dot inria dot fr
@ 2009-10-05 21:52 ` sylvain dot pion at sophia dot inria dot fr
  2009-10-05 22:22 ` paolo dot carlini at oracle dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: sylvain dot pion at sophia dot inria dot fr @ 2009-10-05 21:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from sylvain dot pion at sophia dot inria dot fr  2009-10-05 21:52 -------
Problem still present as of today's trunk.


-- 


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


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

* [Bug c++/39866] [c++0x] deleted functions not removed from "no match" error messages
  2009-04-23 13:04 [Bug c++/39866] New: [c++0x] deleted functions not removed from "no match" error messages sylvain dot pion at sophia dot inria dot fr
  2009-10-05 21:52 ` [Bug c++/39866] " sylvain dot pion at sophia dot inria dot fr
@ 2009-10-05 22:22 ` paolo dot carlini at oracle dot com
  2009-10-13  6:13 ` jason at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-10-05 22:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from paolo dot carlini at oracle dot com  2009-10-05 22:22 -------
Likewise... 


-- 

paolo dot carlini at oracle dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu dot org


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


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

* [Bug c++/39866] [c++0x] deleted functions not removed from "no match" error messages
  2009-04-23 13:04 [Bug c++/39866] New: [c++0x] deleted functions not removed from "no match" error messages sylvain dot pion at sophia dot inria dot fr
  2009-10-05 21:52 ` [Bug c++/39866] " sylvain dot pion at sophia dot inria dot fr
  2009-10-05 22:22 ` paolo dot carlini at oracle dot com
@ 2009-10-13  6:13 ` jason at gcc dot gnu dot org
  2009-10-14  6:28 ` jason at gcc dot gnu dot org
  2009-10-17 15:41 ` jason at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-10-13  6:13 UTC (permalink / raw)
  To: gcc-bugs



-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jason at gcc dot gnu dot org
                   |dot org                     |
           Severity|normal                      |enhancement
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-10-13 06:13:18
               date|                            |


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


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

* [Bug c++/39866] [c++0x] deleted functions not removed from "no match" error messages
  2009-04-23 13:04 [Bug c++/39866] New: [c++0x] deleted functions not removed from "no match" error messages sylvain dot pion at sophia dot inria dot fr
                   ` (2 preceding siblings ...)
  2009-10-13  6:13 ` jason at gcc dot gnu dot org
@ 2009-10-14  6:28 ` jason at gcc dot gnu dot org
  2009-10-17 15:41 ` jason at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-10-14  6:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jason at gcc dot gnu dot org  2009-10-14 06:28 -------
Subject: Bug 39866

Author: jason
Date: Wed Oct 14 06:27:50 2009
New Revision: 152752

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=152752
Log:
        PR c++/39866
        * call.c (print_z_candidates): Don't print deleted candidates.
        (print_z_candidate): Note deleted candidates.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/defaulted14.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/call.c
    trunk/gcc/testsuite/ChangeLog
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/testsuite/20_util/unique_ptr/assign/assign_neg.cc


-- 


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


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

* [Bug c++/39866] [c++0x] deleted functions not removed from "no match" error messages
  2009-04-23 13:04 [Bug c++/39866] New: [c++0x] deleted functions not removed from "no match" error messages sylvain dot pion at sophia dot inria dot fr
                   ` (3 preceding siblings ...)
  2009-10-14  6:28 ` jason at gcc dot gnu dot org
@ 2009-10-17 15:41 ` jason at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-10-17 15:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jason at gcc dot gnu dot org  2009-10-17 15:41 -------
Fixed for 4.5.0.


-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.5.0


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


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

end of thread, other threads:[~2009-10-17 15:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-23 13:04 [Bug c++/39866] New: [c++0x] deleted functions not removed from "no match" error messages sylvain dot pion at sophia dot inria dot fr
2009-10-05 21:52 ` [Bug c++/39866] " sylvain dot pion at sophia dot inria dot fr
2009-10-05 22:22 ` paolo dot carlini at oracle dot com
2009-10-13  6:13 ` jason at gcc dot gnu dot org
2009-10-14  6:28 ` jason at gcc dot gnu dot org
2009-10-17 15:41 ` 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).