summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2018-10-05 12:11:21 +0000
committermillert <millert@openbsd.org>2018-10-05 12:11:21 +0000
commit9557662830d9eb8fe42418c5f43cf57517ab0e2e (patch)
treef5b5d39c05c4054d4105a1405434252a570fcb11
parentAdd regress variable to run setup once for all tests. (diff)
downloadwireguard-openbsd-9557662830d9eb8fe42418c5f43cf57517ab0e2e.tar.xz
wireguard-openbsd-9557662830d9eb8fe42418c5f43cf57517ab0e2e.zip
It is perfectly legal in C++ to use the same name for a struct tag
and a typedef. Remove the bits saying otherwise. We shouldn't suggest using a leading underscore in a name since such names are reserved for the language.
-rw-r--r--share/man/man9/style.915
1 files changed, 3 insertions, 12 deletions
diff --git a/share/man/man9/style.9 b/share/man/man9/style.9
index 141b5b3cddf..4a8900cd995 100644
--- a/share/man/man9/style.9
+++ b/share/man/man9/style.9
@@ -22,9 +22,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $OpenBSD: style.9,v 1.71 2017/07/10 21:39:38 tedu Exp $
+.\" $OpenBSD: style.9,v 1.72 2018/10/05 12:11:21 millert Exp $
.\"
-.Dd $Mdocdate: July 10 2017 $
+.Dd $Mdocdate: October 5 2018 $
.Dt STYLE 9
.Os
.Sh NAME
@@ -227,16 +227,7 @@ is both possible and beneficial when using an ordinary struct tag.
When convention requires a typedef, make its name match the struct tag.
Avoid typedefs ending in
.Dq Li \&_t ,
-except as specified in Standard C or by
-.Tn POSIX .
-Don't use the same name for a struct tag and a typedef, as this makes
-the code unusable from C++.
-.Bd -literal -offset indent
-/* Make the structure name match the typedef. */
-typedef struct _bar {
- int level;
-} BAR;
-.Ed
+except as specified in Standard C or by POSIX.
.Bd -literal -offset indent
/*
* All major routines should have a comment briefly describing what