This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/19741] suboptimal error message for template functions (as opposed to non-templates)
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 20 Jan 2012 02:56:03 +0000
- Subject: [Bug c++/19741] suboptimal error message for template functions (as opposed to non-templates)
- Auto-submitted: auto-generated
- References: <bug-19741-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19741
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-01-20 02:56:03 UTC ---
We get on the trunk:
t.cc: In function âint main()â:
t.cc:21:33: error: no matching function for call to âOp<int>::Exec(int,
<unresolved overloaded function type>)â
t.cc:21:33: note: candidate is:
t.cc:13:14: note: static bool Op<T>::Exec(T, Op<T>::op_func) [with T = int;
Op<T>::op_func = bool (*)(int)]
t.cc:13:14: note: no known conversion for argument 2 from â<unresolved
overloaded function type>â to âOp<int>::op_func {aka bool (*)(int)}â
t.cc: In instantiation of âstatic bool Op<T>::Exec(T, Op<T>::op_func) [with T =
int; Op<T>::op_func = bool (*)(int)]â:
t.cc:21:11: required from here
t.cc:15:25: warning: cast to pointer from integer of different size
[-Wint-to-pointer-cast]