From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31328 invoked by alias); 25 Mar 2013 18:40:28 -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 31050 invoked by uid 48); 25 Mar 2013 18:40:21 -0000 From: "tromey at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/56723] New: wrong location in error message Date: Mon, 25 Mar 2013 18:40: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-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tromey at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: 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 X-SW-Source: 2013-03/txt/msg01815.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D56723 Bug #: 56723 Summary: wrong location in error message Classification: Unclassified Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: tromey@gcc.gnu.org Consider this source file: int f (int *); int callf (int, int, int (*)(double *)); int docall(void) { return callf (23, 72, f); } Compiling this with g++ yields: t.cc: In function =E2=80=98int docall()=E2=80=99: t.cc:8:4: error: invalid conversion from =E2=80=98int (*)(int*)=E2=80=99 to= =E2=80=98int (*)(double*)=E2=80=99 [-fpermissive] f); ^ t.cc:3:5: error: initializing argument 3 of =E2=80=98int callf(int, int, = int (*)(double*))=E2=80=99 [-fpermissive] int callf (int, int, int (*)(double *)); ^ Note that "8:4" location. I think this is slightly off. The C compiler gets it ok: barimba. gcc -g --syntax-only t.c t.c: In function =E2=80=98docall=E2=80=99: t.c:8:3: warning: passing argument 3 of =E2=80=98callf=E2=80=99 from incomp= atible pointer type [enabled by default] (etc) >>From gcc-bugs-return-418375-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Mar 25 18:43:28 2013 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 3454 invoked by alias); 25 Mar 2013 18:43:28 -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 3423 invoked by uid 48); 25 Mar 2013 18:43:20 -0000 From: "tromey at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/56724] New: sub-optimal location in error Date: Mon, 25 Mar 2013 18:43: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-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tromey at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: 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 X-SW-Source: 2013-03/txt/msg01816.txt.bz2 Content-length: 1114 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D56724 Bug #: 56724 Summary: sub-optimal location in error Classification: Unclassified Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned@gcc.gnu.org ReportedBy: tromey@gcc.gnu.org Consider this source: int f (int *); int callf (int, int, int (*)(double *)); int docall(void) { return callf (23, 72, f); } Compiling this, I get: t.c: In function =E2=80=98docall=E2=80=99: t.c:8:3: warning: passing argument 3 of =E2=80=98callf=E2=80=99 from incomp= atible pointer type [enabled by default] f); ^ t.c:3:5: note: expected =E2=80=98int (*)(double *)=E2=80=99 but argument is= of type =E2=80=98int (*)(int *)=E2=80=99 int callf (int, int, int (*)(double *)); ^ I think the location "3:5" is not ideal. It would be better, at least IMO, if it pointed to the particular parameter in the declaration. If you have many parameters, it can be hard to find the right one. >>From gcc-bugs-return-418376-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Mar 25 18:44:29 2013 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 4207 invoked by alias); 25 Mar 2013 18:44:28 -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 4153 invoked by uid 48); 25 Mar 2013 18:44:21 -0000 From: "tromey at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/56725] New: extra spaces in error message Date: Mon, 25 Mar 2013 18:44: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-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tromey at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: 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 X-SW-Source: 2013-03/txt/msg01817.txt.bz2 Content-length: 1048 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D56725 Bug #: 56725 Summary: extra spaces in error message Classification: Unclassified Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: tromey@gcc.gnu.org Consider this source: int f (int *); int callf (int, int, int (*)(double *)); int docall(void) { return callf (23, 72, f); } If I compile this with g++ I get: t.c: In function =E2=80=98int docall()=E2=80=99: t.c:8:4: error: invalid conversion from =E2=80=98int (*)(int*)=E2=80=99 to = =E2=80=98int (*)(double*)=E2=80=99 [-fpermissive] f); ^ t.c:3:5: error: initializing argument 3 of =E2=80=98int callf(int, int, i= nt (*)(double*))=E2=80=99 [-fpermissive] int callf (int, int, int (*)(double *)); ^ You have mail in /var/spool/mail/tromey Note the extra spaces before "initializing". This looked weird to me. >>From gcc-bugs-return-418377-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Mar 25 18:44:42 2013 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 4910 invoked by alias); 25 Mar 2013 18:44:42 -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 4730 invoked by uid 48); 25 Mar 2013 18:44:37 -0000 From: "tromey at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/56724] sub-optimal location in error Date: Mon, 25 Mar 2013 18:44: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: X-Bugzilla-Severity: normal X-Bugzilla-Who: tromey at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 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" MIME-Version: 1.0 X-SW-Source: 2013-03/txt/msg01818.txt.bz2 Content-length: 170 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56724 --- Comment #1 from Tom Tromey 2013-03-25 18:44:37 UTC --- This affects g++ as well.