This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/19741] suboptimal error message for template functions (as opposed to non-templates)


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]


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]