From owner-svn-src-all@freebsd.org Fri Jun 17 17:22:02 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24849A78A3C; Fri, 17 Jun 2016 17:22:02 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0413F175C; Fri, 17 Jun 2016 17:22:02 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 16AD4B917; Fri, 17 Jun 2016 13:22:01 -0400 (EDT) From: John Baldwin To: Bryan Drewery Cc: Konstantin Belousov , Conrad Meyer , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r301959 - head/sys/kern Date: Fri, 17 Jun 2016 10:21:45 -0700 Message-ID: <1585557.0rxbtFOHCR@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.3-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: References: <201606161158.u5GBwkd1042632@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 17 Jun 2016 13:22:01 -0400 (EDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jun 2016 17:22:02 -0000 On Friday, June 17, 2016 09:56:47 AM Bryan Drewery wrote: > On 6/17/2016 9:51 AM, Bryan Drewery wrote: > > On 6/16/2016 11:13 PM, Konstantin Belousov wrote: > >> On Thu, Jun 16, 2016 at 10:17:19AM -0700, Conrad Meyer wrote: > >>> style(9) nit: /* FALLTHROUGH */ > >> > >> FALLTHROUGH is only applicable when there are executable statements for > >> both cases, and first sequence of statements does not end in break. > >> Look at the switch() example right after the FALLTHROUGH requirement > >> in the style(9), which shows case '?'. > >> > > > > Yes the example shows code in both cases, but the text about it is more > > strict "Elements in a switch statement that cascade should have a > > FALLTHROUGH comment." > > > > My personal opinion does agree with your interpretation. I think we > should clarify style.9 about when to use FALLTHROUGH. As Bruce often notes, the code samples in style(9) trump the prose if there is a conflict. This is the first time I've ever seen anyone suggest that an empty case body warrants a FALLTHROUGH, and I don't recall ever seeing a single example of it in the tree. I had assumed that the Conrad had just misread the diff and assumed there was still a code block there, not that Conrad actually wanted a FALLTHROUGH for an empty block. In that case, I'm not sure changing style.9 would help as the trigger was misreading the diff, not confusion over the FALLTHROUGH convention. -- John Baldwin