From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11912 invoked by alias); 29 Dec 2014 01:50:35 -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 11744 invoked by uid 48); 29 Dec 2014 01:50:27 -0000 From: "manu at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/64431] "-Wignored-qualifiers" warning gives misleading position in code Date: Mon, 29 Dec 2014 01:50: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: 4.9.2 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: manu at gcc dot gnu.org X-Bugzilla-Status: NEW 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: keywords bug_status cf_reconfirmed_on cc everconfirmed Message-ID: In-Reply-To: References: 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-12/txt/msg02834.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D64431 Manuel L=C3=B3pez-Ib=C3=A1=C3=B1ez changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |diagnostic Status|UNCONFIRMED |NEW Last reconfirmed| |2014-12-29 CC| |manu at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #2 from Manuel L=C3=B3pez-Ib=C3=A1=C3=B1ez --- This is a problem also in C, however, in C++ it is trivial to fix: Index: gcc/cp/decl.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- gcc/cp/decl.c (revision 218749) +++ gcc/cp/decl.c (working copy) @@ -9686,11 +9686,11 @@ grokdeclarator (const cp_declarator *dec Make sure we have a valid type for the function to return. = */ if (type_quals !=3D TYPE_UNQUALIFIED) { if (SCALAR_TYPE_P (type) || VOID_TYPE_P (type)) - warning (OPT_Wignored_qualifiers, + warning_at (declspecs->locations[ds_const], OPT_Wignored_qualifiers, "type qualifiers ignored on function return type= "); /* We now know that the TYPE_QUALS don't apply to the decl, but to its return type. */ type_quals =3D TYPE_UNQUALIFIED; } I would suggest to add a testcase with explicit column numbers. I added this to the list of EasyHacks and I'll leave it to a new dev to fix= it (see https://gcc.gnu.org/wiki/GettingStarted#Basics:_Contributing_to_GCC_in_10_e= asy_steps if you want to be the one) >>From gcc-bugs-return-471828-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Dec 29 02:09:38 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 1397 invoked by alias); 29 Dec 2014 02:09:37 -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 1046 invoked by uid 48); 29 Dec 2014 02:09:25 -0000 From: "sandra at codesourcery dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/64377] nios2 compile error in options-save.c Date: Mon, 29 Dec 2014 02:09:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: build X-Bugzilla-Severity: normal X-Bugzilla-Who: sandra at codesourcery dot com X-Bugzilla-Status: NEW 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: cc assigned_to 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-12/txt/msg02835.txt.bz2 Content-length: 607 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64377 Sandra Loosemore changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hubicka at ucw dot cz Assignee|sandra at codesourcery dot com |unassigned at gcc dot gnu.org --- Comment #3 from Sandra Loosemore --- This has been discussed on the gcc-patches mailing list in this thread: https://gcc.gnu.org/ml/gcc-patches/2014-11/msg02616.html