From owner-svn-src-all@FreeBSD.ORG Thu Jan 6 12:47:53 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3513D106566C; Thu, 6 Jan 2011 12:47:53 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 08E9F8FC16; Thu, 6 Jan 2011 12:47:53 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id A6D5746B06; Thu, 6 Jan 2011 07:47:52 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id C96CC8A01D; Thu, 6 Jan 2011 07:47:51 -0500 (EST) From: John Baldwin To: Julian Elischer Date: Thu, 6 Jan 2011 07:47:48 -0500 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20101102; KDE/4.4.5; amd64; ; ) References: <201101060833.p068Xmrj008299@svn.freebsd.org> <4D258533.3@freebsd.org> In-Reply-To: <4D258533.3@freebsd.org> MIME-Version: 1.0 Message-Id: <201101060747.48443.jhb@freebsd.org> Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Thu, 06 Jan 2011 07:47:51 -0500 (EST) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.9 required=4.2 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Edward Tomasz Napierala Subject: Re: svn commit: r217048 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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: Thu, 06 Jan 2011 12:47:53 -0000 On Thursday, January 06, 2011 4:02:43 am Julian Elischer wrote: > On 1/6/11 12:33 AM, Edward Tomasz Napierala wrote: > > Author: trasz > > Date: Thu Jan 6 08:33:48 2011 > > New Revision: 217048 > > URL: http://svn.freebsd.org/changeset/base/217048 > > > > Log: > > Get rid of bad advice regarding /* NOTREACHED */. Compilers don't > > really need it (one can use __dead2 instead), and style(9) was not > > even consistent with itself in this regard. > > > > Modified: > > head/share/man/man9/style.9 > > > > Modified: head/share/man/man9/style.9 > > ============================================================================== > > --- head/share/man/man9/style.9 Thu Jan 6 08:13:30 2011 (r217047) > > +++ head/share/man/man9/style.9 Thu Jan 6 08:33:48 2011 (r217048) > > @@ -470,9 +470,6 @@ statement that cascade should have a > > .Li FALLTHROUGH > > comment. > > Numerical arguments should be checked for accuracy. > > -Code that cannot be reached should have a > > -.Li NOTREACHED > > -comment. > > I object STRONGLY to this change. > > The NOTREACHED is also to help the reader understand what has happened > and as an afterthought > was also useful in LINT. I know know of no technological change to > the average reader that makes > it less useful. Clutter. It should be very obvious that exit(), err*(), pthread_exit(), kthread_exit(), kproc_exit() and even usage() all terminate without returning (the last not required, just a very common convention). If you look at most code, NOTREACHED is actually used sparingly if at all. Needless clutter makes code harder to parse (less of it fits into a single editor window) and should be avoided. Most cases of 'ARGSUSED' are probably worse than 'NOTREACHED' abuses. Also, our code in general has not followed this rule. Some older code (back when lint was used before compilers (and lint) supported things like __dead2) still uses it, but new code tends to not use it. __dead2 is actually far more useful than NOTREACHED since the compiler groks it (whereas compilers ignore NOTREACHED comments). -- John Baldwin