]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Fix reference manual clauses
authorRonan Desplanques <desplanques@adacore.com>
Tue, 19 Nov 2024 15:51:44 +0000 (16:51 +0100)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Thu, 12 Dec 2024 09:57:58 +0000 (10:57 +0100)
The clauses in section 3.5 of the reference manual were moved around
along the different Ada versions, which caused some comments in our
source code to go out of date. This patch updates the references in
those comments.

gcc/ada/ChangeLog:

* libgnat/a-tifiio.adb: Fix comment.
* libgnat/a-tifiio__128.adb: Likewise.
* libgnat/s-imaged.ads (Image_Decimal): Likewise.
* libgnat/s-imagef.ads (Image_Fixed): Likewise.
* libgnat/s-imager.ads (Image_Fixed_Point): Likewise.
* libgnat/s-imde32.ads (Image_Decimal32): Likewise.
* libgnat/s-imfi64.ads (Image_Fixed64): Likewise.
* libgnat/s-imgcha.adb (Image_Character): Likewise.
* libgnat/s-valuer.adb (Scan_Raw_Real): Likewise.
* sem_attr.adb (Eval_Attribute): Likewise.

gcc/ada/libgnat/a-tifiio.adb
gcc/ada/libgnat/a-tifiio__128.adb
gcc/ada/libgnat/s-imaged.ads
gcc/ada/libgnat/s-imagef.ads
gcc/ada/libgnat/s-imager.ads
gcc/ada/libgnat/s-imde32.ads
gcc/ada/libgnat/s-imfi64.ads
gcc/ada/libgnat/s-imgcha.adb
gcc/ada/libgnat/s-valuer.adb
gcc/ada/sem_attr.adb

index c44b2ba36f78f0dd9c064eb320c5eb0890b5c2e8..7358d123313733a97f2d005111e3915b5444ce99 100644 (file)
@@ -69,7 +69,7 @@
 --  Operations
 --  ----------
 
---  [Wide_[Wide_]]Image attribute (see RM 3.5(27.1/2))
+--  [Wide_[Wide_]]Image attribute (see RM 4.10(30))
 
 --          These attributes return a decimal real literal best approximating
 --          the value (rounded away from zero if halfway between) with a
index 51b4b219ff792d5e6078636adce305d59a192d0a..59ce81cc706c9980d57523fe919c0408276f74b6 100644 (file)
@@ -69,7 +69,7 @@
 --  Operations
 --  ----------
 
---  [Wide_[Wide_]]Image attribute (see RM 3.5(27.1/2))
+--  [Wide_[Wide_]]Image attribute (see RM 4.10(30))
 
 --          These attributes return a decimal real literal best approximating
 --          the value (rounded away from zero if halfway between) with a
index c9017d11e3130c1194bc853e541b48327b475dda..d9debde3c27d3b66b679809917d748d691c26a3c 100644 (file)
@@ -48,7 +48,7 @@ package System.Image_D is
    --  Computes fixed_type'Image (V), where V is the integer value (in units of
    --  delta) of a decimal type whose Scale is as given and stores the result
    --  S (1 .. P), updating P on return. The result is computed according to
-   --  the rules for image for fixed-point types (RM 3.5(34)). The caller
+   --  the rules for image for fixed-point types (RM 4.10(14)). The caller
    --  guarantees that S is long enough to hold the result and has a lower
    --  bound of 1.
 
index bcb3aee15faa7d038d02ff2c5258fe1807af8040..277559dcb9d308b9a9011dbaae7cabc89c4bed7c 100644 (file)
@@ -56,7 +56,7 @@ package System.Image_F is
    --  Computes fixed_type'Image (V), where V is the integer value (in units of
    --  small) of an ordinary fixed point type with small Num/Den, and stores
    --  the result in S (1 .. P), updating P on return. The result is computed
-   --  according to the rules for image for fixed-point types (RM 3.5(34)).
+   --  according to the rules for image for fixed-point types (RM 4.10(14)).
    --  For0 and Aft0 are the values of the Fore and Aft attributes for the
    --  fixed point type whose mantissa type is Int and whose small is Num/Den.
    --  This function is used only for fixed point whose Small is the ratio of
index 700582bfda5900a35d4d2e9133dff4cdd8f0a634..826815588ad55da07819fa85048fc6b8065e90ea 100644 (file)
@@ -56,7 +56,7 @@ package System.Image_R is
       Aft : Natural);
    --  Computes fixed_type'Image (V) and returns the result in S (1 .. P)
    --  updating P on return. The result is computed according to the rules for
-   --  image for fixed-point types (RM 3.5(34)), where Aft is the value of the
+   --  image for fixed-point types (RM 4.10(14)), where Aft is the value of the
    --  Aft attribute for the fixed-point type. The caller guarantees that S is
    --  long enough to hold the result and has a lower bound of 1.
    --
@@ -69,9 +69,9 @@ package System.Image_R is
       Digs : Natural);
    --  Computes Uns'Image (V) and returns the result in S (1 .. P) updating P
    --  on return. The result is computed according to the rules for image for
-   --  floating-point types (RM 3.5(33)), where Digs is the value of the Digits
-   --  attribute for the floating-point type. The caller guarantees that S is
-   --  long enough to hold the result and has a lower bound of 1.
+   --  floating-point types (RM 4.10(13)), where Digs is the value of the
+   --  Digits attribute for the floating-point type. The caller guarantees that
+   --  S is long enough to hold the result and has a lower bound of 1.
 
    procedure Set_Image_Real
      (V    : Num;
index b048c4870141a2b49a80be8f4289e3cc222fbcec..335fd955099e4fc31e1eca8df5b55123c739bd00 100644 (file)
@@ -52,7 +52,7 @@ package System.Img_Decimal_32 is
    --  Computes fixed_type'Image (V), where V is the integer value (in units of
    --  delta) of a decimal type whose Scale is as given and stores the result
    --  S (1 .. P), updating P on return. The result is computed according to
-   --  the rules for image for fixed-point types (RM 3.5(34)). The caller
+   --  the rules for image for fixed-point types (RM 4.10(14)). The caller
    --  guarantees that S is long enough to hold the result and has a lower
    --  bound of 1.
 
index 4e10e031ba199263ed98b4a154098721e99a121e..06a54174f81cb55308f2a871bc5a6cdb0452b4d8 100644 (file)
@@ -55,7 +55,7 @@ package System.Img_Fixed_64 is
    --  Computes fixed_type'Image (V), where V is the integer value (in units of
    --  small) of an ordinary fixed point type with small Num/Den, and stores
    --  the result in S (1 .. P), updating P on return. The result is computed
-   --  according to the rules for image for fixed-point types (RM 3.5(34)).
+   --  according to the rules for image for fixed-point types (RM 4.10(14)).
    --  For0 and Aft0 are the values of the Fore and Aft attributes for the
    --  fixed point type whose mantissa type is Int64 and whose small is
    --  Num/Den. This function is used only for fixed point whose Small is an
index 65b411df5bf85e50fbd91b76520ddc686da7dc7b..5de5324c2ae6b38c03fe87c23e0d7beec7edd9d5 100644 (file)
@@ -120,7 +120,7 @@ package body System.Img_Char is
                Character'Val (16#9F#) => "APC"];
 
    begin
-      --  Control characters are represented by their names (RM 3.5(32))
+      --  Control characters are represented by their names (RM 4.10(12))
 
       if V in C0_Range then
          S (1 .. 3) := C0 (V);
@@ -152,7 +152,8 @@ package body System.Img_Char is
             end;
          end if;
 
-      --  Normal characters yield the character enclosed in quotes (RM 3.5(32))
+      --  Normal characters yield the character enclosed in quotes
+      --  (RM 4.10(12)).
 
       else
          S (1) := ''';
index e6b8698e5f78b3e48e2d4ff1267b33b456917ecb..619bc0824560343f69ce12738606ca524ef51975 100644 (file)
@@ -585,7 +585,7 @@ package body System.Value_R is
            (Str, Index, Max, Base, False, Value, Scale, N,
             Char_As_Digit (Extra), Base_Violation);
 
-      --  A dot is allowed only if followed by a digit (RM 3.5(47))
+      --  A dot is allowed only if followed by a digit (RM 3.5(39.8))
 
       elsif Str (Index) = '.'
         and then Index < Max
index 2315d515ac4d9c61bf02c51826e7c08c2c8b4cef..2c17aef1528f594768184f82752755a2bf0bed54 100644 (file)
@@ -10724,7 +10724,7 @@ package body Sem_Attr is
                else
                   --  For floating-point, we have +N.dddE+nnn where length
                   --  of ddd is determined by type'Digits - 1, but is one
-                  --  if Digits is one (RM 3.5 (33)).
+                  --  if Digits is one (RM 4.10 (13)).
 
                   --  nnn is set to 2 for Short_Float and Float (32 bit
                   --  floats), and 3 for Long_Float and Long_Long_Float.
@@ -10762,7 +10762,8 @@ package body Sem_Attr is
                --  The non-null case depends on the specific real type
 
                else
-                  --  For fixed-point type width is Fore + 1 + Aft (RM 3.5(34))
+                  --  For fixed-point type width is Fore + 1 + Aft
+                  --  (RM 4.10(14)).
 
                   Fold_Uint
                     (N, UI_From_Int (Fore_Value + 1) + Aft_Value (P_Type),