From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 86657 invoked by alias); 7 Oct 2016 12:30:28 -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 86631 invoked by uid 89); 7 Oct 2016 12:30:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.6 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= 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 ESMTP; Fri, 07 Oct 2016 12:30:25 +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 B8AA0C00BB3F for ; Fri, 7 Oct 2016 12:30:24 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-116-44.ams2.redhat.com [10.36.116.44]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u97CUMxx013176 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 7 Oct 2016 08:30:24 -0400 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id u97CUKCf031997; Fri, 7 Oct 2016 14:30:20 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id u97CUIGk031996; Fri, 7 Oct 2016 14:30:18 +0200 Date: Fri, 07 Oct 2016 12:30:00 -0000 From: Jakub Jelinek To: Marek Polacek Cc: GCC Patches Subject: Re: Fix missing -Wimplicit-fallthrough warning Message-ID: <20161007123018.GH7282@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <20160929161027.GT3223@redhat.com> <20161005165254.GV3223@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161005165254.GV3223@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-IsSubscribed: yes X-SW-Source: 2016-10/txt/msg00482.txt.bz2 On Wed, Oct 05, 2016 at 06:52:55PM +0200, Marek Polacek wrote: > Ping. > > On Thu, Sep 29, 2016 at 06:10:27PM +0200, Marek Polacek wrote: > > Here, a missing -Wimplicit-fallthrough warning was caused by a misplaced > > FALLTHROUGH_LABEL_P check. As it is now, for FALLTHROUGH_LABEL_P we'd > > never gotten around to > > 1933 /* So that next warn_implicit_fallthrough_r will start looking for > > 1934 a new sequence starting with this label. */ > > 1935 gsi_prev (gsi_p); > > > > The fix is to move the check to should_warn_for_implicit_fallthrough. > > > > Bootstrapped/regtested on x86_64-linux and ppc64-linux, ok for trunk? > > > > 2016-09-29 Marek Polacek > > > > * gimplify.c (should_warn_for_implicit_fallthrough): Check for > > FALLTHROUGH_LABEL_P here... > > (warn_implicit_fallthrough_r): ...not here. > > > > * c-c++-common/Wimplicit-fallthrough-22.c: New test. Ok, thanks. Jakub