]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Address ??? comments
authorGhjuvan Lacambre <lacambre@adacore.com>
Sun, 28 Mar 2021 12:10:53 +0000 (14:10 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 21 Jun 2021 10:45:09 +0000 (06:45 -0400)
gcc/ada/

* exp_ch9.adb (Build_Simple_Entry_Call): Add comment.
* libgnat/s-rannum.adb (Random): Update comment.
* libgnat/s-rannum.ads (Generator): Update comment.

gcc/ada/exp_ch9.adb
gcc/ada/libgnat/s-rannum.adb
gcc/ada/libgnat/s-rannum.ads

index 3948b6a51a3c9fa0d9875eea061c7e5c6bc612e1..6b1e284f3fbbc2583d6b4c58ec94992359e4cf95 100644 (file)
@@ -282,7 +282,11 @@ package body Exp_Ch9 is
       Concval : Node_Id;
       Ename   : Node_Id;
       Index   : Node_Id);
-   --  Some comments here would be useful ???
+   --  Build the call corresponding to the task entry call. N is the task entry
+   --  call, Concval is the concurrent object, Ename is the entry name and
+   --  Index is the entry family index.
+   --  Note that N might be expanded into an N_Block_Statement if it gets
+   --  inlined.
 
    function Build_Task_Proc_Specification (T : Entity_Id) return Node_Id;
    --  This routine constructs a specification for the procedure that we will
index 87691676a73a7c301dd33b4af98244897666d6de..0a1565b83d7e0c2d91a198b7df6c3ff1c4bada8c 100644 (file)
@@ -178,7 +178,10 @@ is
    function Random (Gen : Generator) return Unsigned_32 is
       G : Generator renames Gen.Writable.Self.all;
       Y : State_Val;
-      I : Integer;      --  should avoid use of identifier I ???
+      I : Integer;
+      --  Naming exception: I is fine to use here as it is the name used in
+      --  the original paper describing the Mersenne Twister and in common
+      --  descriptions of the algorithm.
 
    begin
       I := G.I;
index 855b5b57d45a665c13591ffe8938e499808cf32a..370a07989b99cdf043cdbff4874f37e008343298 100644 (file)
@@ -162,7 +162,9 @@ private
 
       I : Integer := N;
       --  Current starting position in shift register S (N means uninitialized)
-      --  We should avoid using the identifier I here ???
+      --  Naming exception: I is fine to use here as it is the name used in the
+      --  original paper describing the Mersenne Twister and in common
+      --  descriptions of the algorithm.
    end record;
 
 end System.Random_Numbers;