From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22618 invoked by alias); 19 Apr 2011 07:53:00 -0000 Received: (qmail 22610 invoked by uid 22791); 19 Apr 2011 07:53:00 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST X-Spam-Check-By: sourceware.org Received: from mail-ww0-f51.google.com (HELO mail-ww0-f51.google.com) (74.125.82.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 19 Apr 2011 07:52:46 +0000 Received: by wwf26 with SMTP id 26so6332186wwf.8 for ; Tue, 19 Apr 2011 00:52:44 -0700 (PDT) MIME-Version: 1.0 Received: by 10.227.39.66 with SMTP id f2mr5952200wbe.2.1303199564843; Tue, 19 Apr 2011 00:52:44 -0700 (PDT) Received: by 10.227.0.140 with HTTP; Tue, 19 Apr 2011 00:52:44 -0700 (PDT) In-Reply-To: References: Date: Tue, 19 Apr 2011 09:13:00 -0000 Message-ID: Subject: Re: FDO usage: -Wcoverage-mismatch should not ignore -Wno-error From: Richard Guenther To: Xinliang David Li Cc: GCC Patches , Jan Hubicka , Neil Vachharajani , "Joseph S. Myers" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-04/txt/msg01491.txt.bz2 On Tue, Apr 19, 2011 at 9:13 AM, Xinliang David Li wro= te: > -Wcoverage-mismatch is enabled by default, and the warning is promoted > to error by default. However in the current implementation -Wno-error > can not demote the error back to warning. The patch was ported from > one contributed by Neil. > > OK for trunk after regression testing? I am sure there is a better way to achieve this, like making Werror=3Dcoverage-mismatch the default. Joseph? Richard. > > 2011-04-18 =A0Neil Vachharajani =A0 > > =A0 =A0* flags.c: =A0New flag variable. > =A0 =A0* opts.c (common_handle_options): Set flag_werror_set. > =A0 =A0* opts-global.c (decode_options): Delay Werror decision > =A0 =A0for Wcoverage-mismatch util after options are parsed. > > The following test case can be added, but the test harness does not > like the extra warnings -- how can they be pruned? > > Thanks, > > David > > /* { dg-options "-O2 -Wcoverage-mismatch -Wno-error" } */ > > int __attribute__((noinline)) bar (void) > { > } > > #ifdef _PROFILE_USE > int foo (int i) > { > =A0if (i) > =A0 =A0bar (); > =A0else > =A0 bar (); > =A0return 0; > } > #else > int foo (int i) > { > =A0if (i) > =A0 =A0bar (); > =A0return 0; > } > #endif > > int main(int argc, char **argv) > { > =A0foo (argc); > =A0return 0; > } >