aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Rybin <rybin@adacore.com>2021-02-17 16:31:08 +0300
committerPierre-Marie de Rodat <derodat@adacore.com>2021-06-16 04:42:57 -0400
commita85d1c14073af24e79f19abf50271e219511054d (patch)
tree4058c8bfdfd805dfc31a9405f83bf89b2861501c
parent059a91ea91b04307feb66fbce62a1279526b7481 (diff)
downloadgcc-a85d1c14073af24e79f19abf50271e219511054d.zip
gcc-a85d1c14073af24e79f19abf50271e219511054d.tar.gz
gcc-a85d1c14073af24e79f19abf50271e219511054d.tar.bz2
[Ada] Clarify the documentation of -gnaty0 style check option
gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Instead of referring to the formatting of the Ada examples in Ada RM add use the list of checks that are actually performed. * gnat_ugn.texi: Regenerate.
-rw-r--r--gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst14
-rw-r--r--gcc/ada/gnat_ugn.texi21
2 files changed, 31 insertions, 4 deletions
diff --git a/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst b/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst
index 3da03df..63b3f17 100644
--- a/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst
+++ b/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst
@@ -4629,8 +4629,18 @@ checks to be performed. The following checks are defined:
in the string after :switch:`-gnaty`
then proper indentation is checked, with the digit indicating the
indentation level required. A value of zero turns off this style check.
- The general style of required indentation is as specified by
- the examples in the Ada Reference Manual. Full line comments must be
+ The rule checks that the following constructs start on a column that is
+ a multiple of the alignment level:
+
+ * beginnings of declarations (except record component declarations)
+ and statements;
+
+ * beginnings of the structural components of compound statements;
+
+ * ``end`` keyword that completes the declaration of a program unit declaration
+ or body or that completes a compound statement.
+
+ Full line comments must be
aligned with the ``--`` starting on a column that is a multiple of
the alignment level, or they may be aligned the same way as the following
non-blank line (this is useful when full line comments appear in the middle
diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi
index e6078e6..78814c3 100644
--- a/gcc/ada/gnat_ugn.texi
+++ b/gcc/ada/gnat_ugn.texi
@@ -13227,8 +13227,25 @@ If a digit from 1-9 appears
in the string after @code{-gnaty}
then proper indentation is checked, with the digit indicating the
indentation level required. A value of zero turns off this style check.
-The general style of required indentation is as specified by
-the examples in the Ada Reference Manual. Full line comments must be
+The rule checks that the following constructs start on a column that is
+a multiple of the alignment level:
+
+
+@itemize *
+
+@item
+beginnings of declarations (except record component declarations)
+and statements;
+
+@item
+beginnings of the structural components of compound statements;
+
+@item
+@code{end} keyword that completes the declaration of a program unit declaration
+or body or that completes a compound statement.
+@end itemize
+
+Full line comments must be
aligned with the @code{--} starting on a column that is a multiple of
the alignment level, or they may be aligned the same way as the following
non-blank line (this is useful when full line comments appear in the middle