public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Pierre-Marie de Rodat <pmderodat@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r12-1496] [Ada] Clarify the documentation of -gnaty0 style check option
Date: Wed, 16 Jun 2021 08:44:01 +0000 (GMT)	[thread overview]
Message-ID: <20210616084401.C1290393C032@sourceware.org> (raw)

https://gcc.gnu.org/g:a85d1c14073af24e79f19abf50271e219511054d

commit r12-1496-ga85d1c14073af24e79f19abf50271e219511054d
Author: Sergey Rybin <rybin@adacore.com>
Date:   Wed Feb 17 16:31:08 2021 +0300

    [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.

Diff:
---
 .../building_executable_programs_with_gnat.rst      | 14 ++++++++++++--
 gcc/ada/gnat_ugn.texi                               | 21 +++++++++++++++++++--
 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 3da03dfd307..63b3f17d402 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 e6078e67e9b..78814c3a5d9 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


                 reply	other threads:[~2021-06-16  8:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210616084401.C1290393C032@sourceware.org \
    --to=pmderodat@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).