mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-19 09:14:14 +08:00
* gdbint.texinfo (Formatting): Mention some formatting guidelines
for casts and unary operators.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2011-02-04 Pedro Alves <pedro@codesourcery.com>
|
||||||
|
|
||||||
|
* gdbint.texinfo (Formatting): Mention some formatting guidelines
|
||||||
|
for casts and unary operators.
|
||||||
|
|
||||||
2011-02-04 Tom Tromey <tromey@redhat.com>
|
2011-02-04 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
* gdb.texinfo (GDB/MI Async Records): Document that symbols-loaded
|
* gdb.texinfo (GDB/MI Async Records): Document that symbols-loaded
|
||||||
|
@ -5785,7 +5785,8 @@ compiler.
|
|||||||
|
|
||||||
@cindex source code formatting
|
@cindex source code formatting
|
||||||
The standard GNU recommendations for formatting must be followed
|
The standard GNU recommendations for formatting must be followed
|
||||||
strictly.
|
strictly. Any @value{GDBN}-specific deviation from GNU
|
||||||
|
recomendations is described below.
|
||||||
|
|
||||||
A function declaration should not have its name in column zero. A
|
A function declaration should not have its name in column zero. A
|
||||||
function definition should have its name in column zero.
|
function definition should have its name in column zero.
|
||||||
@ -5828,6 +5829,27 @@ void * foo;
|
|||||||
void* foo;
|
void* foo;
|
||||||
@end smallexample
|
@end smallexample
|
||||||
|
|
||||||
|
In addition, whitespace around casts and unary operators should follow
|
||||||
|
the following guidelines:
|
||||||
|
|
||||||
|
@multitable @columnfractions .2 .2 .8
|
||||||
|
@item Use... @tab ...instead of @tab
|
||||||
|
|
||||||
|
@item @code{!x}
|
||||||
|
@tab @code{! x}
|
||||||
|
@item @code{~x}
|
||||||
|
@tab @code{~ x}
|
||||||
|
@item @code{-x}
|
||||||
|
@tab @code{- x}
|
||||||
|
@tab (unary minus)
|
||||||
|
@item @code{(foo) x}
|
||||||
|
@tab @code{(foo)x}
|
||||||
|
@tab (cast)
|
||||||
|
@item @code{*x}
|
||||||
|
@tab @code{* x}
|
||||||
|
@tab (pointer dereference)
|
||||||
|
@end multitable
|
||||||
|
|
||||||
@subsection Comments
|
@subsection Comments
|
||||||
|
|
||||||
@cindex comment formatting
|
@cindex comment formatting
|
||||||
|
Reference in New Issue
Block a user