svn commit: r291754 - stable/10/share/man/man9
Garrett Cooper
ngie at FreeBSD.org
Fri Dec 4 09:07:19 UTC 2015
Author: ngie
Date: Fri Dec 4 09:07:18 2015
New Revision: 291754
URL: https://svnweb.freebsd.org/changeset/base/291754
Log:
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/10/share/man/man9/style.9
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/share/man/man9/style.9
==============================================================================
--- stable/10/share/man/man9/style.9 Fri Dec 4 09:01:58 2015 (r291753)
+++ stable/10/share/man/man9/style.9 Fri Dec 4 09:07:18 2015 (r291754)
@@ -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 ,
More information about the svn-src-stable-10
mailing list