public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/16232] New: Poor diagnostic @ 2004-06-27 17:23 igodard at pacbell dot net 2004-06-27 17:41 ` [Bug c++/16232] " pinskia at gcc dot gnu dot org ` (4 more replies) 0 siblings, 5 replies; 6+ messages in thread From: igodard at pacbell dot net @ 2004-06-27 17:23 UTC (permalink / raw) To: gcc-bugs template<typename T> struct A { template<typename U> void Foo(){} }; template<typename V>struct B { void Bar(V* v) { v->template Foo<int>(); v->Foo(); } }; int main() { A<bool> a; B<A<bool> > b; b.Bar(&a); } gets you: ~/ootbc/common/test/src$ g++ foo.cc foo.cc: In member function `void B<V>::Bar(V*) [with V = A<bool>]': foo.cc:12: instantiated from here foo.cc:6: error: no matching function for call to `A<bool>::Foo()' As with many other g++ diagnostics, the error message is a true statement but not very helpful to the user. Something like: "Call to 'A<bool>::Foo()' is ambiguous. Candidates are: foo.cc/6: template<typename U> void Foo(){} }; May need explicit qualification of function name" would help a lot. FWIW, Comeau is not that much better: "ComeauTest.c", line 6: error: no instance of function template "A<T>::Foo [with T=bool]" matches the argument list object type is: A<bool> v->Foo(); ^ detected during instantiation of "void B<V>::Bar(V *) [with V=A<bool>]" at line 12 -- Summary: Poor diagnostic Product: gcc Version: 3.4.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: igodard at pacbell dot net CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16232 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/16232] Poor diagnostic 2004-06-27 17:23 [Bug c++/16232] New: Poor diagnostic igodard at pacbell dot net @ 2004-06-27 17:41 ` pinskia at gcc dot gnu dot org 2004-06-27 17:41 ` igodard at pacbell dot net ` (3 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: pinskia at gcc dot gnu dot org @ 2004-06-27 17:41 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From pinskia at gcc dot gnu dot org 2004-06-27 17:41 ------- *** Bug 16233 has been marked as a duplicate of this bug. *** -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16232 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/16232] Poor diagnostic 2004-06-27 17:23 [Bug c++/16232] New: Poor diagnostic igodard at pacbell dot net 2004-06-27 17:41 ` [Bug c++/16232] " pinskia at gcc dot gnu dot org @ 2004-06-27 17:41 ` igodard at pacbell dot net 2004-06-27 17:48 ` igodard at pacbell dot net ` (2 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: igodard at pacbell dot net @ 2004-06-27 17:41 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From igodard at pacbell dot net 2004-06-27 17:41 ------- *** Bug 16231 has been marked as a duplicate of this bug. *** -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16232 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/16232] Poor diagnostic 2004-06-27 17:23 [Bug c++/16232] New: Poor diagnostic igodard at pacbell dot net 2004-06-27 17:41 ` [Bug c++/16232] " pinskia at gcc dot gnu dot org 2004-06-27 17:41 ` igodard at pacbell dot net @ 2004-06-27 17:48 ` igodard at pacbell dot net 2004-06-27 17:49 ` pinskia at gcc dot gnu dot org 2005-06-27 4:36 ` pinskia at gcc dot gnu dot org 4 siblings, 0 replies; 6+ messages in thread From: igodard at pacbell dot net @ 2004-06-27 17:48 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From igodard at pacbell dot net 2004-06-27 17:48 ------- Should 16232 and 16233 really be consolidated? They are two different problems as far as I can see: #16232 is syntactically correct but ambiguous, and should be reported as such; #16233 is syntactically incorrect, which seems a different error to me. Ivan -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16232 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/16232] Poor diagnostic 2004-06-27 17:23 [Bug c++/16232] New: Poor diagnostic igodard at pacbell dot net ` (2 preceding siblings ...) 2004-06-27 17:48 ` igodard at pacbell dot net @ 2004-06-27 17:49 ` pinskia at gcc dot gnu dot org 2005-06-27 4:36 ` pinskia at gcc dot gnu dot org 4 siblings, 0 replies; 6+ messages in thread From: pinskia at gcc dot gnu dot org @ 2004-06-27 17:49 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From pinskia at gcc dot gnu dot org 2004-06-27 17:48 ------- Confirmed, here is somthing much shorter: struct A { A() { Foo(); } template<typename U> void Foo(); }; -- What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed| |1 Keywords| |diagnostic Last reconfirmed|0000-00-00 00:00:00 |2004-06-27 17:48:24 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16232 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/16232] Poor diagnostic 2004-06-27 17:23 [Bug c++/16232] New: Poor diagnostic igodard at pacbell dot net ` (3 preceding siblings ...) 2004-06-27 17:49 ` pinskia at gcc dot gnu dot org @ 2005-06-27 4:36 ` pinskia at gcc dot gnu dot org 4 siblings, 0 replies; 6+ messages in thread From: pinskia at gcc dot gnu dot org @ 2005-06-27 4:36 UTC (permalink / raw) To: gcc-bugs -- What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |enhancement Last reconfirmed|2005-04-06 18:13:06 |2005-06-27 04:36:15 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16232 ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-06-27 4:36 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2004-06-27 17:23 [Bug c++/16232] New: Poor diagnostic igodard at pacbell dot net 2004-06-27 17:41 ` [Bug c++/16232] " pinskia at gcc dot gnu dot org 2004-06-27 17:41 ` igodard at pacbell dot net 2004-06-27 17:48 ` igodard at pacbell dot net 2004-06-27 17:49 ` pinskia at gcc dot gnu dot org 2005-06-27 4:36 ` pinskia 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).