public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/61990] New: Incorrect caret location for type mismatches in function calls
@ 2014-08-01 13:51 dmalcolm at redhat dot com
2015-04-22 12:00 ` [Bug c++/61990] " jakub at gcc dot gnu.org
2015-07-16 9:16 ` rguenth at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: dmalcolm at redhat dot com @ 2014-08-01 13:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61990
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 ‘foo*’ to ‘bar*’ for argument ‘3’ to
‘void some_fn(foo*, foo*, bar*, foo*, foo*)’
some_fn (f, f, f, f, f);
^
It manages to report the arg num, but the caret is in the wrong place, on the
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: <gcc-bugs-return-457555-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
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: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
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" <gcc-bugzilla@gcc.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: <bug-61990-4-QkZiThNgtC@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-61990-4@http.gcc.gnu.org/bugzilla/>
References: <bug-61990-4@http.gcc.gnu.org/bugzilla/>
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?ida990
Marek Polacek <mpolacek at gcc dot gnu.org> 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 <mpolacek at gcc dot gnu.org> ---
Mine.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-07-16 9:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-01 13:51 [Bug c++/61990] New: Incorrect caret location for type mismatches in function calls dmalcolm at redhat dot com
2015-04-22 12:00 ` [Bug c++/61990] " jakub at gcc dot gnu.org
2015-07-16 9:16 ` rguenth at gcc dot gnu.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).