public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dmalcolm at redhat dot com" <gcc-bugzilla@gcc.gnu.org>
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	[thread overview]
Message-ID: <bug-61990-4@http.gcc.gnu.org/bugzilla/> (raw)

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.


             reply	other threads:[~2014-08-01 13:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-01 13:51 dmalcolm at redhat dot com [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-61990-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).