From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5349 invoked by alias); 1 Aug 2014 13:51:09 -0000 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 Received: (qmail 5293 invoked by uid 48); 1 Aug 2014 13:51:04 -0000 From: "dmalcolm at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/61990] New: Incorrect caret location for type mismatches in function calls Date: Fri, 01 Aug 2014 13:51:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dmalcolm at redhat dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-08/txt/msg00051.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D61990 Bug ID: 61990 Summary: Incorrect caret location for type mismatches in function calls Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: dmalcolm at redhat dot com Given the following test.cc: ------------------------------------------------------- class foo {}; class bar {}; extern void some_fn (foo *, foo *, bar *, foo *, foo *); void test(foo *f) { some_fn (f, f, f, f, f); } ------------------------------------------------------- GCC trunk as of 2014-05-29 r211061 reports: /tmp/test.cc:9:25: error: cannot convert =E2=80=98foo*=E2=80=99 to =E2=80= =98bar*=E2=80=99 for argument =E2=80=983=E2=80=99 to =E2=80=98void some_fn(foo*, foo*, bar*, foo*, foo*)=E2=80=99 some_fn (f, f, f, f, f); ^ It manages to report the arg num, but the caret is in the wrong place, on t= he end paren; the caret should indicate the location of the bogus arg instead: some_fn (f, f, f, f, f); ^ (Ideally, the whole of the bogus subexpression should be underlined, though= I appreciate that's a more involved fix architecturally). >>From gcc-bugs-return-457555-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Aug 01 13:55:15 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 11308 invoked by alias); 1 Aug 2014 13:55:14 -0000 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 Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 11193 invoked by uid 48); 1 Aug 2014 13:55:11 -0000 From: "mpolacek at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/61990] Incorrect caret location for type mismatches in function calls Date: Fri, 01 Aug 2014 13:55: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-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mpolacek at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: mpolacek at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.10.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on cc assigned_to target_milestone everconfirmed Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-08/txt/msg00052.txt.bz2 Content-length: 700 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61990 Marek Polacek changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2014-08-01 CC| |mpolacek at gcc dot gnu.org Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org Target Milestone|--- |4.10.0 Ever confirmed|0 |1 --- Comment #1 from Marek Polacek --- Mine.