From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 50172 invoked by alias); 22 Feb 2016 21:18:32 -0000 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 Received: (qmail 50162 invoked by uid 89); 22 Feb 2016 21:18:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1389, 38.000000000, 38000000000, war X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 22 Feb 2016 21:18:30 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id AF3D88F316 for ; Mon, 22 Feb 2016 21:18:29 +0000 (UTC) Received: from tucnak.zalov.cz ([10.3.113.11]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u1MLISCO020135 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Mon, 22 Feb 2016 16:18:29 -0500 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id u1MLIQRE024743 for ; Mon, 22 Feb 2016 22:18:27 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id u1MLIPbA024742 for gcc-patches@gcc.gnu.org; Mon, 22 Feb 2016 22:18:25 +0100 Date: Mon, 22 Feb 2016 21:18:00 -0000 From: Jakub Jelinek To: gcc-patches@gcc.gnu.org Subject: [PATCH] Note that -Wunreachable-code used to be a warning option (PR c/69900) Message-ID: <20160222211825.GR3017@tucnak.redhat.com> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-IsSubscribed: yes X-SW-Source: 2016-02/txt/msg01518.txt.bz2 Hi! While we ignore -Wunreachable-code option now, as we require that GCC diagnostic options are CL_WARNING only, we should remember that this is a former Warning option (similarly for -Werror=). Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2016-02-22 Jakub Jelinek PR c/69900 * common.opt (Wunreachable-code): Add Warning flag. * gcc.dg/pr69900.c: New test. --- gcc/common.opt.jj 2016-02-16 21:43:38.000000000 +0100 +++ gcc/common.opt 2016-02-22 12:16:53.393949080 +0100 @@ -728,7 +728,7 @@ Common Var(warn_maybe_uninitialized) War Warn about maybe uninitialized automatic variables. Wunreachable-code -Common Ignore +Common Ignore Warning Does nothing. Preserved for backward compatibility. Wunused --- gcc/testsuite/gcc.dg/pr69900.c.jj 2016-02-22 12:29:22.177681519 +0100 +++ gcc/testsuite/gcc.dg/pr69900.c 2016-02-22 12:29:09.000000000 +0100 @@ -0,0 +1,6 @@ +/* PR c/69900 */ +/* { dg-do compile } */ + +#pragma GCC diagnostic error "-Wunreachable-code" /* { dg-bogus "is not an option that controls warnings" } */ +#pragma GCC diagnostic warning "-Wunreachable-code" /* { dg-bogus "is not an option that controls warnings" } */ +#pragma GCC diagnostic ignored "-Wunreachable-code" /* { dg-bogus "is not an option that controls warnings" } */ Jakub