From: Piotr Trojanek <troja...@adacore.com>

We seem to have a convention of using "RM" in the GNAT comments, not
"Ada RM". Also, the paragraph references by convention should appear
in parentheses, e.g. "8.3(12.3/2)", not "8.3 12.3/2".

gcc/ada/

        * einfo.ads, exp_attr.adb, exp_ch4.adb, exp_ch7.adb,
        lib-writ.adb, libgnat/a-stbuut.ads, sem_ch13.adb, sem_ch3.adb,
        sem_ch7.adb: Use "RM" in comments.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/einfo.ads            | 2 +-
 gcc/ada/exp_attr.adb         | 4 ++--
 gcc/ada/exp_ch4.adb          | 2 +-
 gcc/ada/exp_ch7.adb          | 2 +-
 gcc/ada/lib-writ.adb         | 3 +--
 gcc/ada/libgnat/a-stbuut.ads | 2 +-
 gcc/ada/sem_ch13.adb         | 4 ++--
 gcc/ada/sem_ch3.adb          | 2 +-
 gcc/ada/sem_ch7.adb          | 2 +-
 9 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/gcc/ada/einfo.ads b/gcc/ada/einfo.ads
index e5110f51670..0b0529a39cf 100644
--- a/gcc/ada/einfo.ads
+++ b/gcc/ada/einfo.ads
@@ -2728,7 +2728,7 @@ package Einfo is
 --       Defined in all entities. Set for implicitly declared subprograms
 --       that require overriding or are null procedures, and are hidden by
 --       a non-fully conformant homograph with the same characteristics
---       (Ada RM 8.3 12.3/2).
+--       (RM 8.3(12.3/2)).
 
 --    Is_Hidden_Open_Scope
 --       Defined in all entities. Set for a scope that contains the
diff --git a/gcc/ada/exp_attr.adb b/gcc/ada/exp_attr.adb
index 0349db28a1a..1396007a2d1 100644
--- a/gcc/ada/exp_attr.adb
+++ b/gcc/ada/exp_attr.adb
@@ -2173,8 +2173,8 @@ package body Exp_Attr is
       --  for the arguments of a 'Read attribute reference (since the
       --  scalar argument is an OUT scalar) and for the arguments of a
       --  'Has_Same_Storage or 'Overlaps_Storage attribute reference (which not
-      --  considered to be reads of their prefixes and expressions, see Ada RM
-      --  13.3(73.10/3)).
+      --  considered to be reads of their prefixes and expressions, see
+      --  RM 13.3(73.10/3)).
 
       if Validity_Checks_On and then Validity_Check_Operands
         and then Id /= Attribute_Asm_Output
diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb
index 6ceffdf8302..95b7765b173 100644
--- a/gcc/ada/exp_ch4.adb
+++ b/gcc/ada/exp_ch4.adb
@@ -8512,7 +8512,7 @@ package body Exp_Ch4 is
 
          --  For small negative exponents, we return the reciprocal of
          --  the folding of the exponentiation for the opposite (positive)
-         --  exponent, as required by Ada RM 4.5.6(11/3).
+         --  exponent, as required by RM 4.5.6(11/3).
 
          if abs Expv <= 4 then
 
diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb
index 993c13c7318..fd1d9db0654 100644
--- a/gcc/ada/exp_ch7.adb
+++ b/gcc/ada/exp_ch7.adb
@@ -7419,7 +7419,7 @@ package body Exp_Ch7 is
                      --  non-POC components are finalized before the
                      --  non-POC extension components. This violates the
                      --  usual "finalize in reverse declaration order"
-                     --  principle, but that's ok (see Ada RM 7.6.1(9)).
+                     --  principle, but that's ok (see RM 7.6.1(9)).
                      --
                      --  Last_POC_Call should be non-empty if the extension
                      --  has at least one POC. Interactions with variant
diff --git a/gcc/ada/lib-writ.adb b/gcc/ada/lib-writ.adb
index 697b2f2b797..0755b92e4db 100644
--- a/gcc/ada/lib-writ.adb
+++ b/gcc/ada/lib-writ.adb
@@ -298,8 +298,7 @@ package body Lib.Writ is
          function Is_Implicit_With_Clause (Clause : Node_Id) return Boolean is
          begin
             --  With clauses created for ancestor units are marked as internal,
-            --  however, they emulate the semantics in Ada RM 10.1.2 (6/2),
-            --  where
+            --  however, they emulate the semantics in RM 10.1.2 (6/2), where
             --
             --    with A.B;
             --
diff --git a/gcc/ada/libgnat/a-stbuut.ads b/gcc/ada/libgnat/a-stbuut.ads
index dadfe5f0010..2a8b08bca57 100644
--- a/gcc/ada/libgnat/a-stbuut.ads
+++ b/gcc/ada/libgnat/a-stbuut.ads
@@ -33,7 +33,7 @@ with Ada.Strings.UTF_Encoding.Wide_Wide_Strings;
 
 package Ada.Strings.Text_Buffers.Utils with Pure is
 
-   --  Ada.Strings.Text_Buffers is a predefined unit (see Ada RM A.4.12).
+   --  Ada.Strings.Text_Buffers is a predefined unit (see RM A.4.12).
    --  This is a GNAT-defined child unit of that parent.
 
    subtype Character_7 is
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb
index c0a5b6c2c37..f84ca2c75d7 100644
--- a/gcc/ada/sem_ch13.adb
+++ b/gcc/ada/sem_ch13.adb
@@ -12860,7 +12860,7 @@ package body Sem_Ch13 is
       procedure Hide_Non_Overridden_Subprograms (Typ : Entity_Id);
       --  Inspect the primitive operations of type Typ and hide all pairs of
       --  implicitly declared non-overridden non-fully conformant homographs
-      --  (Ada RM 8.3 12.3/2).
+      --  (RM 8.3(12.3/2)).
 
       -------------------------------------
       -- Hide_Non_Overridden_Subprograms --
@@ -13028,7 +13028,7 @@ package body Sem_Ch13 is
       --  overriding. If this set contains fully conformant homographs, then
       --  one is chosen arbitrarily (already done during resolution), otherwise
       --  all remaining non-fully conformant homographs are hidden from
-      --  visibility (Ada RM 8.3 12.3/2).
+      --  visibility (RM 8.3(12.3/2)).
 
       if Is_Tagged_Type (E) then
          Hide_Non_Overridden_Subprograms (E);
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index 263be607ec1..0403babff13 100644
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -16553,7 +16553,7 @@ package body Sem_Ch3 is
 
       New_Overloaded_Entity (New_Subp, Derived_Type);
 
-      --  Ada RM 6.1.1 (15): If a subprogram inherits nonconforming class-wide
+      --  RM 6.1.1(15): If a subprogram inherits nonconforming class-wide
       --  preconditions and the derived type is abstract, the derived operation
       --  is abstract as well if parent subprogram is not abstract or null.
 
diff --git a/gcc/ada/sem_ch7.adb b/gcc/ada/sem_ch7.adb
index a70d72c94c1..09d85bea335 100644
--- a/gcc/ada/sem_ch7.adb
+++ b/gcc/ada/sem_ch7.adb
@@ -2400,7 +2400,7 @@ package body Sem_Ch7 is
 
          --  Do not enter implicitly inherited non-overridden subprograms of
          --  a tagged type back into visibility if they have non-conformant
-         --  homographs (Ada RM 8.3 12.3/2).
+         --  homographs (RM 8.3(12.3/2)).
 
          elsif Is_Hidden_Non_Overridden_Subpgm (Id) then
             null;
-- 
2.45.1

Reply via email to