From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Jun 2 15:30:00 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 97FA2A5A for ; Sun, 2 Jun 2013 15:30:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 7887C1DC3 for ; Sun, 2 Jun 2013 15:30:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r52FU0Xv065835 for ; Sun, 2 Jun 2013 15:30:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r52FU0KB065832; Sun, 2 Jun 2013 15:30:00 GMT (envelope-from gnats) Resent-Date: Sun, 2 Jun 2013 15:30:00 GMT Resent-Message-Id: <201306021530.r52FU0KB065832@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Sergey Kandaurov Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1CD95A54 for ; Sun, 2 Jun 2013 15:29:13 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121]) by mx1.freebsd.org (Postfix) with ESMTP id 0C73C1DBF for ; Sun, 2 Jun 2013 15:29:13 +0000 (UTC) Received: from oldred.freebsd.org ([127.0.1.6]) by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r52FTCjr075460 for ; Sun, 2 Jun 2013 15:29:12 GMT (envelope-from nobody@oldred.freebsd.org) Received: (from nobody@localhost) by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r52FTCei075450; Sun, 2 Jun 2013 15:29:12 GMT (envelope-from nobody) Message-Id: <201306021529.r52FTCei075450@oldred.freebsd.org> Date: Sun, 2 Jun 2013 15:29:12 GMT From: Sergey Kandaurov To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/179204: [patch] lang/gcc4[6789]: -Wcast-qual reports incorrect message X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Jun 2013 15:30:00 -0000 >Number: 179204 >Category: ports >Synopsis: [patch] lang/gcc4[6789]: -Wcast-qual reports incorrect message >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Jun 02 15:30:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Sergey Kandaurov >Release: FreeBSD 9.1-STABLE >Organization: >Environment: FreeBSD omg 9.1-STABLE FreeBSD 9.1-STABLE #0: Sun Mar 24 18:49:50 MSK 2013 root@omg:/usr/obj/amd64.amd64/usr/src/sys/GENERIC amd64 >Description: This is a request to apply patch from GNU GCC Bugzilla report 55383. gcc erroneously reports incorrect message about casting volatile to non-volatile like this: src/core/ngx_connection.c:988:29: error: cast discards '__attribute__((noreturn))' qualifier from pointer target type [-Werror=cast-qual] The correct warning message: src/core/ngx_connection.c:988:29: error: cast discards 'volatile' qualifier from pointer target type [-Werror=cast-qual] The applied patch as from Bugzilla PR c/55383 fixes it. Please note that at the time of filing this PR the patch has status NEW and is not committed to gcc tree. >How-To-Repeat: >Fix: Apply patch generated against ports svn tree. Patch attached with submission follows: Index: lang/gcc46/files/patch-c-typeck.c =================================================================== --- lang/gcc46/files/patch-c-typeck.c (revision 0) +++ lang/gcc46/files/patch-c-typeck.c (working copy) @@ -0,0 +1,17 @@ +Manuel López-Ibáñez 2012-11-18 21:15:09 UTC + + PR c/55383 + * c/c-typeck.c: Use %qv for non-function types + +--- gcc/c-typeck.c~ 2012-09-15 04:29:28.000000000 +0400 ++++ gcc/c-typeck.c 2013-06-02 13:57:25.000000000 +0400 +@@ -4456,7 +4456,7 @@ + /* There are qualifiers present in IN_OTYPE that are not present + in IN_TYPE. */ + warning_at (loc, OPT_Wcast_qual, +- "cast discards %q#v qualifier from pointer target type", ++ "cast discards %qv qualifier from pointer target type", + discarded); + + if (added || discarded) + Index: lang/gcc47/files/patch-c-typeck.c =================================================================== --- lang/gcc47/files/patch-c-typeck.c (revision 0) +++ lang/gcc47/files/patch-c-typeck.c (working copy) @@ -0,0 +1,17 @@ +Manuel López-Ibáñez 2012-11-18 21:15:09 UTC + + PR c/55383 + * c/c-typeck.c: Use %qv for non-function types + +--- gcc/c-typeck.c~ 2012-09-15 04:29:28.000000000 +0400 ++++ gcc/c-typeck.c 2013-06-02 13:57:25.000000000 +0400 +@@ -4456,7 +4456,7 @@ + /* There are qualifiers present in IN_OTYPE that are not present + in IN_TYPE. */ + warning_at (loc, OPT_Wcast_qual, +- "cast discards %q#v qualifier from pointer target type", ++ "cast discards %qv qualifier from pointer target type", + discarded); + + if (added || discarded) + Index: lang/gcc48/files/patch-c-typeck.c =================================================================== --- lang/gcc48/files/patch-c-typeck.c (revision 0) +++ lang/gcc48/files/patch-c-typeck.c (working copy) @@ -0,0 +1,17 @@ +Manuel López-Ibáñez 2012-11-18 21:15:09 UTC + + PR c/55383 + * c/c-typeck.c: Use %qv for non-function types + +--- gcc/c/c-typeck.c~ 2012-09-15 04:29:28.000000000 +0400 ++++ gcc/c/c-typeck.c 2013-06-02 13:57:25.000000000 +0400 +@@ -4456,7 +4456,7 @@ + /* There are qualifiers present in IN_OTYPE that are not present + in IN_TYPE. */ + warning_at (loc, OPT_Wcast_qual, +- "cast discards %q#v qualifier from pointer target type", ++ "cast discards %qv qualifier from pointer target type", + discarded); + + if (added || discarded) + Index: lang/gcc49/files/patch-c-typeck.c =================================================================== --- lang/gcc49/files/patch-c-typeck.c (revision 0) +++ lang/gcc49/files/patch-c-typeck.c (working copy) @@ -0,0 +1,17 @@ +Manuel López-Ibáñez 2012-11-18 21:15:09 UTC + + PR c/55383 + * c/c-typeck.c: Use %qv for non-function types + +--- gcc/c/c-typeck.c~ 2012-09-15 04:29:28.000000000 +0400 ++++ gcc/c/c-typeck.c 2013-06-02 13:57:25.000000000 +0400 +@@ -4456,7 +4456,7 @@ + /* There are qualifiers present in IN_OTYPE that are not present + in IN_TYPE. */ + warning_at (loc, OPT_Wcast_qual, +- "cast discards %q#v qualifier from pointer target type", ++ "cast discards %qv qualifier from pointer target type", + discarded); + + if (added || discarded) + >Release-Note: >Audit-Trail: >Unformatted: