From patchwork Mon May 12 16:14:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Klose X-Patchwork-Id: 348068 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 4E1A3140077 for ; Tue, 13 May 2014 02:15:05 +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:cc:subject:references :in-reply-to:content-type; q=dns; s=default; b=pcPk2BfLWOxiPS2mC YSIGLt65lEbl/NObqeEV/9rTpi9TqzU9NQFRDFckOvIR2vZ4NyFsftPUoPggIick +IuFregw4IIOLg8sBZKcrEyBk3/HxITx/fbYT1083Q9SQSeuf5r97EuK99EtnDQ3 RM2nItcOJhVmnmnmWNxxZx6p7g= 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:cc:subject:references :in-reply-to:content-type; s=default; bh=lVL5SVj3EqqMtHjmO34IDJE z4Ts=; b=Zbl5EVuqL3j6nV06Vc/RkrniKwto2sSVj0/zK0j2ONFFnSFVzowTizQ 8ipn5pQlQraFmLudQr9UPjxVe36Q4AKZQg0MCThDmACmPBkzkndJPM7pblNOh2+Q reRcgNfeUBOumRz71BVOD1oJdzKMSObpAPdFWYCaZRcq0i9KOzhY= Received: (qmail 4671 invoked by alias); 12 May 2014 16:14:58 -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 4658 invoked by uid 89); 12 May 2014 16:14:57 -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; Mon, 12 May 2014 16:14:56 +0000 X-Envelope-From: doko@ubuntu.com Received: from [192.168.42.220] (dslb-088-073-099-040.pools.arcor-ip.net [88.73.99.40]) (authenticated bits=0) by einhorn.in-berlin.de (8.14.4/8.14.4/Debian-4) with ESMTP id s4CGEkgH014685 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Mon, 12 May 2014 18:14:47 +0200 Message-ID: <5370F366.80300@ubuntu.com> Date: Mon, 12 May 2014 18:14:30 +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: "Joseph S. Myers" CC: GCC Patches , =?ISO-8859-1?Q?Manuel_L=F3pe?= =?ISO-8859-1?Q?z-Ib=E1=F1ez?= Subject: Re: [patch] fix impliedness of -Wunused-parameter depending on -Wexta option ordering References: <536BF4F1.8020402@ubuntu.com> In-Reply-To: Am 08.05.2014 23:36, schrieb Joseph S. Myers: > On Thu, 8 May 2014, Matthias Klose wrote: > >> 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? > > OK. I didn't look close enough to the gfortran test results. PR driver/61126 is a fix for the regression introduced with the fix for the above issue. With this patch proposed by Manuel, gfortran.dg/wextra_1.f now passes, and no new regressions seen on the trunk and the branches. Matthias gcc/fortran/ PR driver/61126 * options.c (gfc_handle_option): Don't enable -Wunused-parameter with -Wextra * lang.opt (Wunused-parameter): New. gcc/ PR driver/61126 * opts-global.c (set_default_handlers): Fix order of handlers. Index: gcc/fortran/lang.opt =================================================================== --- a/src/gcc/fortran/lang.opt (revision 210277) +++ b/src/gcc/fortran/lang.opt (working copy) @@ -301,6 +301,10 @@ Fortran Warning Warn about unused dummy arguments. +Wunused-parameter +LangEnabledBy(Fortran,Wextra) +; Documented in common.opt + Wzerotrip Fortran Warning Warn about zero-trip DO loops Index: gcc/fortran/options.c =================================================================== --- a/src/gcc/fortran/options.c (revision 210277) +++ b/src/gcc/fortran/options.c (working copy) @@ -674,12 +674,7 @@ break; case OPT_Wextra: - handle_generated_option (&global_options, &global_options_set, - OPT_Wunused_parameter, NULL, value, - gfc_option_lang_mask (), kind, loc, - handlers, global_dc); set_Wextra (value); - break; case OPT_Wfunction_elimination: Index: gcc/opts-global.c =================================================================== --- a/src/gcc/opts-global.c (revision 210277) +++ b/src/gcc/opts-global.c (working copy) @@ -273,10 +273,10 @@ handlers->unknown_option_callback = unknown_option_callback; handlers->wrong_lang_callback = complain_wrong_lang; handlers->num_handlers = 3; - handlers->handlers[0].handler = lang_handle_option; - handlers->handlers[0].mask = initial_lang_mask; - handlers->handlers[1].handler = common_handle_option; - handlers->handlers[1].mask = CL_COMMON; + handlers->handlers[0].handler = common_handle_option; + handlers->handlers[0].mask = CL_COMMON; + handlers->handlers[1].handler = lang_handle_option; + handlers->handlers[1].mask = initial_lang_mask; handlers->handlers[2].handler = target_handle_option; handlers->handlers[2].mask = CL_TARGET; }