From patchwork Thu May 8 21:19:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matthias Klose X-Patchwork-Id: 347249 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 341D014008F for ; Fri, 9 May 2014 07:20:11 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type; q= dns; s=default; b=oZlnCcKw1ulul3mtwKLiv4cDDaRQQY2Skzz3PpDz9bkmk7 0PcYYvtlbjBLyGiVUcnXs60dBWrKPPj4daxzpJhv8oWzHHNyyN5JWyGgJDYiuPx7 0c2SroiciOffIyBbf0zE5SBARVBjNRJjC7ZtRkAZ6zqXf/pJVEg6fusf/+b2I= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type; s= default; bh=BAcuDJmj5QRHEk3mbCQDAVJfNJo=; b=dqiz3o047u6pUXIDvZmO nFUXwP6F5Xr/0IxIoVaLwVVwttbKpqYs5hq5iiLSy5XOp/fKQ/WGBnvm09cIuRrU Kt/eU/geYbfrGZ1msuFcTjSq9n/NTuLh3k4JJIVJFfpkRPgdD9CwTVEZjHn0mo4v IpgBB6p2lXJzed2RrCsNNQw= Received: (qmail 18426 invoked by alias); 8 May 2014 21:20:03 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 18411 invoked by uid 89); 8 May 2014 21:20:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-HELO: einhorn.in-berlin.de Received: from einhorn.in-berlin.de (HELO einhorn.in-berlin.de) (192.109.42.8) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 08 May 2014 21:20:01 +0000 X-Envelope-From: doko@ubuntu.com Received: from [192.168.42.220] (dslb-088-073-095-188.pools.arcor-ip.net [88.73.95.188]) (authenticated bits=0) by einhorn.in-berlin.de (8.14.4/8.14.4/Debian-4) with ESMTP id s48LJugV010170 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Thu, 8 May 2014 23:19:57 +0200 Message-ID: <536BF4F1.8020402@ubuntu.com> Date: Thu, 08 May 2014 23:19:45 +0200 From: Matthias Klose User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: GCC Patches , =?ISO-8859-15?Q?Manuel_L=F3p?= =?ISO-8859-15?Q?ez-Ib=E1=F1ez?= Subject: [patch] fix impliedness of -Wunused-parameter depending on -Wexta option ordering This fixes a regression introduced with 4.8, where the option ordering of -Wextra and -Wunused-parameter emits a warning, which is not emitted with 4.7. No regressions with the trunk, the 4.9 and 4.8 branches. Ok to check in for these? Matthias 2014-05-08 Manuel Lpez-Ibez Matthias Klose PR driver/61106 * optc-gen.awk: Fix option handling for -Wunused-parameter. gcc/testsuite/ 2014-05-08 Matthias Klose PR driver/61106 * gcc-dg/unused-8a.c: New. * gcc-dg/unused-8b.c: Likewise. gcc/ 2014-05-08 Manuel López-Ibáñez Matthias Klose PR driver/61106 * optc-gen.awk: Fix option handling for -Wunused-parameter. gcc/testsuite/ 2014-05-08 Matthias Klose PR driver/61106 * gcc-dg/unused-8a.c: New. * gcc-dg/unused-8b.c: Likewise. Index: gcc/optc-gen.awk =================================================================== --- gcc/optc-gen.awk (revision 210245) +++ gcc/optc-gen.awk (working copy) @@ -406,11 +406,13 @@ if (opt_var_name != "") { condition = "!opts_set->x_" opt_var_name if (thisenableif[j] != "") { - condition = condition " && (" thisenableif[j] ")" + value = "(" thisenableif[j] ")" + } else { + value = "value" } print " if (" condition ")" print " handle_generated_option (opts, opts_set," - print " " opt_enum(thisenable[j]) ", NULL, value," + print " " opt_enum(thisenable[j]) ", NULL, " value "," print " lang_mask, kind, loc, handlers, dc);" } else { print "#error " thisenable[j] " does not have a Var() flag" Index: gcc/testsuite/gcc.dg/unused-8a.c =================================================================== --- gcc/testsuite/gcc.dg/unused-8a.c (revision 0) +++ gcc/testsuite/gcc.dg/unused-8a.c (working copy) @@ -0,0 +1,4 @@ +/* { dg-do compile } */ +/* { dg-options "-Wall -Wextra -Wno-unused" } */ + +void foo(int x) { } Index: gcc/testsuite/gcc.dg/unused-8b.c =================================================================== --- gcc/testsuite/gcc.dg/unused-8b.c (revision 0) +++ gcc/testsuite/gcc.dg/unused-8b.c (working copy) @@ -0,0 +1,4 @@ +/* { dg-do compile } */ +/* { dg-options "-Wall -Wno-unused -Wextra" } */ + +void foo(int x) { }