]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Update libraries with the limited flag
authorViljar Indus <indus@adacore.com>
Fri, 2 Aug 2024 06:09:10 +0000 (09:09 +0300)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Fri, 23 Aug 2024 08:51:04 +0000 (10:51 +0200)
Records without a limited keyword now emit a warning if
they contain a member that has an inherently limited type.

gcc/ada/

* libgnat/a-coinho__shared.ads: add limited keyword.
* libgnat/g-awk.adb: add limited keyword.
* libgnat/g-comlin.ads: add limited keyword.
* libgnat/s-excmac__arm.ads: add limited keyword.
* libgnat/s-excmac__gcc.ads: add limited keyword.
* libgnat/s-soflin.ads: add limited keyword.

gcc/ada/libgnat/a-coinho__shared.ads
gcc/ada/libgnat/g-awk.adb
gcc/ada/libgnat/g-comlin.ads
gcc/ada/libgnat/s-excmac__arm.ads
gcc/ada/libgnat/s-excmac__gcc.ads
gcc/ada/libgnat/s-soflin.ads

index ddab1fd7d93c0965a0254f64d1cf00e5f4d7b78e..57abd1bafe3dfb3f1b7be4108b3a7983842f218f 100644 (file)
@@ -109,7 +109,7 @@ private
 
    type Holder_Access is access all Holder;
 
-   type Shared_Holder is record
+   type Shared_Holder is limited record
       Counter : System.Atomic_Counters.Atomic_Counter;
       Element : Element_Access;
    end record;
index 62856d9204a82b90729f4d9dfa4becb343e6298e..c9284944dd5529b8b4e709b44b355502eb78ec3a 100644 (file)
@@ -261,7 +261,7 @@ package body GNAT.AWK is
    -- Session Data --
    ------------------
 
-   type Session_Data is record
+   type Session_Data is limited record
       Current_File : Text_IO.File_Type;
       Current_Line : Unbounded_String;
       Separators   : Split.Mode_Access;
index c20cd5eb31ae75898bf2e78303ddf9cd6befc51e..2a131e5d78cf92f2f2910422a4f9986c660482be 100644 (file)
@@ -1045,7 +1045,7 @@ private
 
    type Depth is range 1 .. Max_Depth;
 
-   type Level is record
+   type Level is limited record
       Name_Last : Natural := 0;
       Dir       : GNAT.Directory_Operations.Dir_Type;
    end record;
@@ -1087,7 +1087,7 @@ private
       --  separators in the pattern.
    end record;
 
-   type Opt_Parser_Data (Arg_Count : Natural) is record
+   type Opt_Parser_Data (Arg_Count : Natural) is limited record
       Arguments : GNAT.OS_Lib.Argument_List_Access;
       --  null if reading from the command line
 
index 23d02f85ff90cd48050bb22c3ba092a728fe3ef1..463191d6b426622c94b2bdfa330de04494918d6b 100644 (file)
@@ -154,7 +154,7 @@ package System.Exceptions.Machine is
    --  A GNAT exception object to be dealt with by the personality routine
    --  called by the GCC unwinding runtime.
 
-   type GNAT_GCC_Exception is record
+   type GNAT_GCC_Exception is limited record
       Header : Unwind_Control_Block;
       --  ABI Exception header first
 
index 24899055506c513d527c6370dbe88a5c881613bd..6cbc92654ec8cd11a025c73fb6bd19d50dee9507 100644 (file)
@@ -142,7 +142,7 @@ package System.Exceptions.Machine is
    --  A GNAT exception object to be dealt with by the personality routine
    --  called by the GCC unwinding runtime.
 
-   type GNAT_GCC_Exception is record
+   type GNAT_GCC_Exception is limited record
       Header : Unwind_Exception;
       --  ABI Exception header first
 
index c2d947535d9a87a163fd4d6571f84131f4fbfc81..61025e5961dc64638887aa8bf660baa9c02efa4c 100644 (file)
@@ -339,7 +339,7 @@ package System.Soft_Links is
    --  specific data. This type is used to store the necessary data into the
    --  Task_Control_Block or into a global variable in the non tasking case.
 
-   type TSD is record
+   type TSD is limited record
       Pri_Stack_Info : aliased Stack_Checking.Stack_Info;
       --  Information on stack (Base/Limit/Size) used by System.Stack_Checking.
       --  If this TSD does not belong to the environment task, the Size field