From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 39736 invoked by alias); 11 Jul 2016 19:58:27 -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 39670 invoked by uid 89); 11 Jul 2016 19:58:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Mach-O, MachO, mach-o 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, 11 Jul 2016 19:58:26 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C89B07F095 for ; Mon, 11 Jul 2016 19:58:24 +0000 (UTC) Received: from redhat.com (ovpn-204-85.brq.redhat.com [10.40.204.85]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u6BJwLSL020003 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Mon, 11 Jul 2016 15:58:24 -0400 Date: Mon, 11 Jul 2016 19:58:00 -0000 From: Marek Polacek To: GCC Patches Subject: Re: Implement -Wswitch-fallthrough: lto Message-ID: <20160711195821.GA13963@redhat.com> References: <20160711194340.GI13963@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160711194340.GI13963@redhat.com> User-Agent: Mutt/1.6.1 (2016-04-27) X-SW-Source: 2016-07/txt/msg00551.txt.bz2 2016-07-11 Marek Polacek PR c/7652 * lto-plugin.c (lto_fallthrough): Define. (parse_table_entry): Use it. diff --git gcc/lto-plugin/lto-plugin.c gcc/lto-plugin/lto-plugin.c index 51afc52..ffdf54a 100644 --- gcc/lto-plugin/lto-plugin.c +++ gcc/lto-plugin/lto-plugin.c @@ -77,6 +77,12 @@ along with this program; see the file COPYING3. If not see # define O_BINARY 0 #endif +#if __GNUC__ >= 7 +# define lto_fallthrough() __builtin_fallthrough () +#else +# define lto_fallthrough() +#endif + /* Segment name for LTO sections. This is only used for Mach-O. FIXME: This needs to be kept in sync with darwin.c. */ @@ -254,6 +260,7 @@ parse_table_entry (char *p, struct ld_plugin_symbol *entry, break; } /* FALL-THROUGH. */ + lto_fallthrough (); case ss_uscore: entry->name = concat ("_", p, NULL); break;