]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Fix comment about building names in task arrays
authorPiotr Trojanek <trojanek@adacore.com>
Wed, 19 Jan 2022 12:29:46 +0000 (13:29 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 10 May 2022 08:19:21 +0000 (08:19 +0000)
Cleanup related to handling of character values in SPARK
counterexamples, which just like the code for names in task arrays
create N_Character_Literal nodes.

gcc/ada/

* exp_util.adb (Build_Task_Array_Image): Fix style in the
structure of generated code; add Pref'Length as the component of
the Sum initialization expression.

gcc/ada/exp_util.adb

index 263b42f7586f2f1ddb38b3f18fbdcff87bd445f2..b3d1fdf3cdf5dc06e0d201da3716acaa5b8c656d 100644 (file)
@@ -4048,13 +4048,13 @@ package body Exp_Util is
    --  The generated function has the following structure:
 
    --  function F return String is
-   --     Pref : string renames Task_Name;
+   --     Pref : String renames Task_Name;
    --     T1   : String := Index1'Image (Val1);
    --     ...
-   --     Tn   : String := indexn'image (Valn);
-   --     Len  : Integer := T1'Length + ... + Tn'Length + n + 1;
-   --     --  Len includes commas and the end parentheses.
-   --     Res  : String (1..Len);
+   --     Tn   : String := Indexn'Image (Valn);
+   --     Len  : Integer := Pref'Length + T1'Length + ... + Tn'Length + n + 1;
+   --     --  Len includes commas and the end parentheses
+   --     Res  : String (1 .. Len);
    --     Pos  : Integer := Pref'Length;
    --
    --  begin