aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc/gdbint.texinfo
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2012-01-13 14:31:55 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2012-01-13 14:31:55 +0000
commit0ee339bc478ec8c35f4fee8998456bc33be0a3e2 (patch)
treebbb53b702b0664b4f46a686d3fe20b55f148a8c9 /gdb/doc/gdbint.texinfo
parent687be931eb3d3064e1ae6026f0c415048d9914cf (diff)
downloadgdb-0ee339bc478ec8c35f4fee8998456bc33be0a3e2.zip
gdb-0ee339bc478ec8c35f4fee8998456bc33be0a3e2.tar.gz
gdb-0ee339bc478ec8c35f4fee8998456bc33be0a3e2.tar.bz2
gdb/doc/
* gdbint.texinfo (Coding Standards): Require braces for two lines of code.
Diffstat (limited to 'gdb/doc/gdbint.texinfo')
-rw-r--r--gdb/doc/gdbint.texinfo20
1 files changed, 20 insertions, 0 deletions
diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo
index 136f77f..026dc59 100644
--- a/gdb/doc/gdbint.texinfo
+++ b/gdb/doc/gdbint.texinfo
@@ -5849,6 +5849,26 @@ the following guidelines:
@tab (pointer dereference)
@end multitable
+Any two or more lines in code should be wrapped in braces, even if
+they are comments, as they look like separate statements:
+
+@smallexample
+if (i)
+ @{
+ /* Return success. */
+ return 0;
+ @}
+@end smallexample
+
+@noindent
+and not:
+
+@smallexample
+if (i)
+ /* Return success. */
+ return 0;
+@end smallexample
+
@subsection Comments
@cindex comment formatting