From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20082 invoked by alias); 20 Jan 2012 02:56:38 -0000 Received: (qmail 20074 invoked by uid 22791); 20 Jan 2012 02:56:37 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 20 Jan 2012 02:56:25 +0000 From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/19741] suboptimal error message for template functions (as opposed to non-templates) Date: Fri, 20 Jan 2012 03:16:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: minor X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-01/txt/msg02252.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D19741 --- Comment #6 from Andrew Pinski 2012-01-20 0= 2:56:03 UTC --- We get on the trunk: t.cc: In function =E2=80=98int main()=E2=80=99: t.cc:21:33: error: no matching function for call to =E2=80=98Op::Exec(= int, )=E2=80=99 t.cc:21:33: note: candidate is: t.cc:13:14: note: static bool Op::Exec(T, Op::op_func) [with T =3D in= t; Op::op_func =3D bool (*)(int)] t.cc:13:14: note: no known conversion for argument 2 from =E2=80=98=E2=80=99 to =E2=80=98Op::op_func {aka bool (= *)(int)}=E2=80=99 t.cc: In instantiation of =E2=80=98static bool Op::Exec(T, Op::op_fun= c) [with T =3D int; Op::op_func =3D bool (*)(int)]=E2=80=99: t.cc:21:11: required from here t.cc:15:25: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]