Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Dec 2015 09:08:39 +0000 (UTC)
From:      Garrett Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r291756 - stable/9/share/man/man9
Message-ID:  <201512040908.tB498dip048647@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Fri Dec  4 09:08:39 2015
New Revision: 291756
URL: https://svnweb.freebsd.org/changeset/base/291756

Log:
  MFstable/10 r291754:
  
  MFC r284527,r284528,r284608,r285219,r291166,r291167:
  
  r284527 (by imp):
  
  Update style.9 to reflect consensus on developer's mailing list
  allowing redundant braces.
  
  Differential Revision: https://reviews.freebsd.org/D2842
  
  r284528 (by imp):
  
  Bump date.
  
  Submitted by: Xin Li
  
  r284608 (by imp):
  
  Back out contested change until dispute is resolved. This proved to be
  more contentious than I expected.
  
  r285219 (by imp):
  
  The results of the vote are in. This reflects that vote. Single
  line statements inside of braces is recognized as an acceptable
  style.
  	http://reviews.freebsd.org/V3
  As always, this isn't license for wholesale change, etc.
  
  r291166:
  
  Recommend cc -Wall instead of gcc -Wall
  
  r291167:
  
  Bump .Dd

Modified:
  stable/9/share/man/man9/style.9
Directory Properties:
  stable/9/   (props changed)
  stable/9/share/   (props changed)
  stable/9/share/man/   (props changed)
  stable/9/share/man/man9/   (props changed)

Modified: stable/9/share/man/man9/style.9
==============================================================================
--- stable/9/share/man/man9/style.9	Fri Dec  4 09:07:54 2015	(r291755)
+++ stable/9/share/man/man9/style.9	Fri Dec  4 09:08:39 2015	(r291756)
@@ -26,7 +26,7 @@
 .\"	From: @(#)style	1.14 (Berkeley) 4/28/95
 .\" $FreeBSD$
 .\"
-.Dd January 7, 2010
+.Dd November 22, 2015
 .Dt STYLE 9
 .Os
 .Sh NAME
@@ -503,13 +503,14 @@ Code which is unreachable for non-obviou
 .Pp
 Space after keywords
 .Pq Ic if , while , for , return , switch .
-No braces
+Two styles of braces
 .Ql ( \&{
 and
 .Ql \&} )
-are
-used for control statements with zero or only a single statement unless that
-statement is more than a single line in which case they are permitted.
+are allowed for single line statements.
+Either they are used for all single statements, or
+they are used only where needed for clarity.
+Usage within a function should be consistent.
 Forever loops are done with
 .Ic for Ns 's ,
 not
@@ -833,7 +834,7 @@ Whenever possible, code should be run th
 (e.g.,
 .Xr lint 1
 or
-.Nm gcc Fl Wall )
+.Nm cc Fl Wall )
 and produce minimal warnings.
 .Sh SEE ALSO
 .Xr indent 1 ,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201512040908.tB498dip048647>