public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/111230] New: show explicit functions in possible candidates @ 2023-08-29 21:42 mpolacek at gcc dot gnu.org 2023-08-29 21:43 ` [Bug c++/111230] " mpolacek at gcc dot gnu.org 2024-05-20 16:06 ` redi at gcc dot gnu.org 0 siblings, 2 replies; 3+ messages in thread From: mpolacek at gcc dot gnu.org @ 2023-08-29 21:42 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111230 Bug ID: 111230 Summary: show explicit functions in possible candidates Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mpolacek at gcc dot gnu.org Target Milestone: --- struct T { T() { } // #1 explicit T(const T&) { } // #2 }; void g () { T t{}; throw t; } shows h.C: In function ‘void g()’: h.C:10:10: error: no matching function for call to ‘T::T(T)’ 10 | throw t; | ^ h.C:2:4: note: candidate: ‘T::T()’ 2 | T() { } // #1 | ^ h.C:2:4: note: candidate expects 0 arguments, 1 provided h.C:10:10: note: in thrown expression 10 | throw t; | ^ but it never mentions #2. ^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/111230] show explicit functions in possible candidates 2023-08-29 21:42 [Bug c++/111230] New: show explicit functions in possible candidates mpolacek at gcc dot gnu.org @ 2023-08-29 21:43 ` mpolacek at gcc dot gnu.org 2024-05-20 16:06 ` redi at gcc dot gnu.org 1 sibling, 0 replies; 3+ messages in thread From: mpolacek at gcc dot gnu.org @ 2023-08-29 21:43 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111230 Marek Polacek <mpolacek at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Last reconfirmed| |2023-08-29 Status|UNCONFIRMED |ASSIGNED Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org Keywords| |diagnostic --- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> --- Jason: "in add_candidates when we see an explicit constructor we could add it to bad_fns instead of ignoring it" ^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/111230] show explicit functions in possible candidates 2023-08-29 21:42 [Bug c++/111230] New: show explicit functions in possible candidates mpolacek at gcc dot gnu.org 2023-08-29 21:43 ` [Bug c++/111230] " mpolacek at gcc dot gnu.org @ 2024-05-20 16:06 ` redi at gcc dot gnu.org 1 sibling, 0 replies; 3+ messages in thread From: redi at gcc dot gnu.org @ 2024-05-20 16:06 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111230 Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=36183 --- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- Dup of PR 36183? There Jason said: We'd probably get that by changing add_candidates to mark an explicit candidate as bad rather than non-viable, and then adding the explanation to convert_like_real. ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-05-20 16:06 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2023-08-29 21:42 [Bug c++/111230] New: show explicit functions in possible candidates mpolacek at gcc dot gnu.org 2023-08-29 21:43 ` [Bug c++/111230] " mpolacek at gcc dot gnu.org 2024-05-20 16:06 ` redi 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).