aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2011-02-04 19:10:12 +0000
committerPedro Alves <palves@redhat.com>2011-02-04 19:10:12 +0000
commitcef35b0f37719826fd65c1e2376e6328d30b4171 (patch)
tree5b56063c31fe2c6ba488402e3921a0ac1ce1d105 /gdb
parenteee5b35e00dffd1390e080f0270c4b3d421a52e0 (diff)
downloadfsf-binutils-gdb-cef35b0f37719826fd65c1e2376e6328d30b4171.zip
fsf-binutils-gdb-cef35b0f37719826fd65c1e2376e6328d30b4171.tar.gz
fsf-binutils-gdb-cef35b0f37719826fd65c1e2376e6328d30b4171.tar.bz2
* gdbint.texinfo (Formatting): Mention some formatting guidelines
for casts and unary operators.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/doc/ChangeLog5
-rw-r--r--gdb/doc/gdbint.texinfo24
2 files changed, 28 insertions, 1 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index b058fa0..d10f912 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -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>
* gdb.texinfo (GDB/MI Async Records): Document that symbols-loaded
diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo
index 8149cb9..a494707 100644
--- a/gdb/doc/gdbint.texinfo
+++ b/gdb/doc/gdbint.texinfo
@@ -5785,7 +5785,8 @@ compiler.
@cindex source code formatting
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
function definition should have its name in column zero.
@@ -5828,6 +5829,27 @@ void * foo;
void* foo;
@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
@cindex comment formatting