Add a paragraph which should clarify the separation of asterisks
and adjacent tokens in declarations. The added text was originally a single sentence I wrote and which was heavily modified and extended by Bruce Evans. This clarification attempt originates from differing usage of the 'restrict' type-qualifier. Although various documents documents dicussing the C Programming Language put a space between an asterisk and the 'restrict' keyword, including the C99 standard (at least the n869.txt draft) and other ISO/IEC JTC1/SC22/WG14 documents, the IEEE Std 1003.1-2001 document does not separate them. Discussed with: bde Requested by: tjr Separation using a single space also liked by: mike
This commit is contained in:
parent
39449b2c8a
commit
3b12885314
@ -185,6 +185,12 @@ Enumeration values are all uppercase.
|
||||
enum enumtype { ONE, TWO } et;
|
||||
.Ed
|
||||
.Pp
|
||||
In declarations, do not put any whitespace between asterisks and
|
||||
adjacent tokens, except for tokens that are identifiers related to
|
||||
types. (These identifiers are the names of basic types, type
|
||||
qualifiers, and typedef-names other than the one being declared.)
|
||||
Separate these identifers from asterisks using a single space.
|
||||
.Pp
|
||||
When declaring variables in structures, declare them sorted by use, then
|
||||
by size, and then in alphabetical order.
|
||||
The first category normally does not apply, but there are exceptions.
|
||||
|
Loading…
x
Reference in New Issue
Block a user