]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Switch Ada_Version_Runtime to Ada 2020
authorArnaud Charlet <charlet@adacore.com>
Thu, 18 Jun 2020 09:34:17 +0000 (05:34 -0400)
committerGiuliano Belinassi <giuliano.belinassi@usp.br>
Mon, 17 Aug 2020 16:19:43 +0000 (13:19 -0300)
gcc/ada/

* opt.ads (Ada_Version_Runtime): Set to Ada_2020.
* sem_ch3.adb (Analyze_Subtype_Declaration): Propagate
Is_Independent flag to subtypes.
* libgnarl/s-taprop__linux.adb: Adapt to Ada 2020 warning.
* libgnat/a-nbnbin.adb, libgnat/a-nbnbin.ads,
libgnat/a-nbnbin__gmp.adb, libgnat/a-nbnbre.adb,
libgnat/a-nbnbre.ads, libgnat/a-stobbu.adb,
libgnat/a-stobbu.ads, libgnat/a-stobfi.adb,
libgnat/a-stobfi.ads, libgnat/a-stoubu.adb,
libgnat/a-stoubu.ads, libgnat/a-stoufi.adb,
libgnat/a-stoufi.ads, libgnat/a-stoufo.adb,
libgnat/a-stoufo.ads, libgnat/a-stouut.adb,
libgnat/a-stouut.ads, libgnat/a-strsto.ads,
libgnat/a-ststbo.adb, libgnat/a-ststbo.ads,
libgnat/a-ststun.adb, libgnat/a-ststun.ads,
libgnat/a-stteou.ads, libgnat/s-aoinar.ads,
libgnat/s-aomoar.ads, libgnat/s-atopex.ads,
libgnat/s-putaim.adb, libgnat/s-putaim.ads,
libgnat/s-putima.adb, libgnat/s-putima.ads: Remove pragma
Ada_2020, now redundant.

33 files changed:
gcc/ada/libgnarl/s-taprop__linux.adb
gcc/ada/libgnat/a-nbnbin.adb
gcc/ada/libgnat/a-nbnbin.ads
gcc/ada/libgnat/a-nbnbin__gmp.adb
gcc/ada/libgnat/a-nbnbre.adb
gcc/ada/libgnat/a-nbnbre.ads
gcc/ada/libgnat/a-stobbu.adb
gcc/ada/libgnat/a-stobbu.ads
gcc/ada/libgnat/a-stobfi.adb
gcc/ada/libgnat/a-stobfi.ads
gcc/ada/libgnat/a-stoubu.adb
gcc/ada/libgnat/a-stoubu.ads
gcc/ada/libgnat/a-stoufi.adb
gcc/ada/libgnat/a-stoufi.ads
gcc/ada/libgnat/a-stoufo.adb
gcc/ada/libgnat/a-stoufo.ads
gcc/ada/libgnat/a-stouut.adb
gcc/ada/libgnat/a-stouut.ads
gcc/ada/libgnat/a-strsto.ads
gcc/ada/libgnat/a-ststbo.adb
gcc/ada/libgnat/a-ststbo.ads
gcc/ada/libgnat/a-ststun.adb
gcc/ada/libgnat/a-ststun.ads
gcc/ada/libgnat/a-stteou.ads
gcc/ada/libgnat/s-aoinar.ads
gcc/ada/libgnat/s-aomoar.ads
gcc/ada/libgnat/s-atopex.ads
gcc/ada/libgnat/s-putaim.adb
gcc/ada/libgnat/s-putaim.ads
gcc/ada/libgnat/s-putima.adb
gcc/ada/libgnat/s-putima.ads
gcc/ada/opt.ads
gcc/ada/sem_ch3.adb

index 03f5a7ba4cfb024bd6dfb94edf82956d966bf9ce..fb11e0204a46726c30a512671bd2cd2193e7e44e 100644 (file)
@@ -243,9 +243,9 @@ package body System.Task_Primitives.Operations is
       return Ceiling_Support;
    end Get_Ceiling_Support;
 
-   pragma Warnings (Off, "non-static call not allowed in preelaborated unit");
+   pragma Warnings (Off, "non-preelaborable call not allowed*");
    Ceiling_Support : constant Boolean := Get_Ceiling_Support;
-   pragma Warnings (On, "non-static call not allowed in preelaborated unit");
+   pragma Warnings (On, "non-preelaborable call not allowed*");
    --  True if the locking policy is Ceiling_Locking, and the current process
    --  has permission to use this policy. The process has permission if it is
    --  running as 'root', or if the capability was set by the setcap command,
index d3c5f6a37ff9418eb0288ac7b2c51c18c778ffd1..b919d86490e9c7f44463a1cfb373eee29e803484 100644 (file)
@@ -29,8 +29,6 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
-pragma Ada_2020;
-
 with Ada.Unchecked_Deallocation;
 with Ada.Strings.Text_Output.Utils;
 
index 5cf7960db10c816aad46f213d3cb10774bc707b0..7b4974a934f309757381cda52b24fa3c41788860 100644 (file)
@@ -13,8 +13,6 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
-pragma Ada_2020;
-
 with Ada.Strings.Text_Output; use Ada.Strings.Text_Output;
 
 private with Ada.Finalization;
index 9481eed63a1dc82fbfe5baba4fc8d17efba08d59..2e8a2604d64dd825ed65040ca00fed5a275caa98 100644 (file)
@@ -31,8 +31,6 @@
 
 --  This is the GMP version of this package
 
-pragma Ada_2020;
-
 with Ada.Unchecked_Conversion;
 with Ada.Unchecked_Deallocation;
 with Interfaces.C;               use Interfaces.C;
index 987cdb4edaefd8651c7a871859ca55c6b595998e..d61668d1abebc686aa4c03537c2be741d07c526e 100644 (file)
@@ -31,8 +31,6 @@
 
 --  This is the default version of this package, based on Big_Integers only.
 
-pragma Ada_2020;
-
 with Ada.Strings.Text_Output.Utils;
 
 package body Ada.Numerics.Big_Numbers.Big_Reals is
index 2d4ff63f64fb854a9900787f9ee051e0e5bc8fa5..5a8ebb9ccb19bf2b32d89267fc8694d57e914909 100644 (file)
@@ -13,8 +13,6 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
-pragma Ada_2020;
-
 with Ada.Numerics.Big_Numbers.Big_Integers;
 
 with Ada.Strings.Text_Output; use Ada.Strings.Text_Output;
index 64f2b6da76da1886825a63aca5abd0eeaf4c7074..fba591d2200e6dd0a711a06f6243199b13d398c5 100644 (file)
@@ -29,8 +29,6 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
-pragma Ada_2020;
-
 package body Ada.Strings.Text_Output.Bit_Buckets is
 
    type Bit_Bucket_Type is new Sink with null record;
index d2b1011f8f295356628bf93eede819986b8f4db2..027e71170d3e48ba9a0baf08444a5f6764e1b18f 100644 (file)
@@ -29,8 +29,6 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
-pragma Ada_2020;
-
 package Ada.Strings.Text_Output.Bit_Buckets is
    function Bit_Bucket return Sink_Access;
 end Ada.Strings.Text_Output.Bit_Buckets;
index 91edf3fd170fa175befa93177198f8ff4ea6776d..dd485ba8c3dc4b4be06ceab7b386f4a0db1b3a9e 100644 (file)
@@ -29,8 +29,6 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
-pragma Ada_2020;
-
 with Ada.Strings.Text_Output.Utils; use Ada.Strings.Text_Output.Utils;
 package body Ada.Strings.Text_Output.Basic_Files is
    use type OS.File_Descriptor;
index a2892f087aa04c83c2724b415953577761e4c6b2..65e8e24e62e029d4b666b1110b61fd9a2042af4c 100644 (file)
@@ -29,8 +29,6 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
-pragma Ada_2020;
-
 private with GNAT.OS_Lib;
 package Ada.Strings.Text_Output.Basic_Files is
    --  Normally, you should use Ada.Strings.Text_Output.Files, which
index f563ea5c0dd1ceff30c0a444361a8ee6ce77a262..9fb6c5ad3e5b0451f37beb1094c4b225cae4425f 100644 (file)
@@ -29,8 +29,6 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
-pragma Ada_2020;
-
 with Unchecked_Deallocation;
 with Ada.Strings.UTF_Encoding.Strings;
 with Ada.Strings.UTF_Encoding.Wide_Strings;
index 519e473da2feca00dbac5ce83dd9fd1ce77886cc..faec897f9172e6acde27072b58b4c256d7b93804 100644 (file)
@@ -29,8 +29,6 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
-pragma Ada_2020;
-
 package Ada.Strings.Text_Output.Buffers is
 
    type Buffer (<>) is new Sink with private;
index 90c03daf2a01c58ae1d96595969bb4d507b7de32..34086bbed2b0cc3e106085e8e4479d3aa095c26b 100644 (file)
@@ -29,8 +29,6 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
-pragma Ada_2020;
-
 with Ada.Strings.Text_Output.Utils; use Ada.Strings.Text_Output.Utils;
 package body Ada.Strings.Text_Output.Files is
    use type OS.File_Descriptor;
index a94124b421f0185f2adfb610946a1e3dea568b66..0bff45afed9c3bfa403dee7311f30b742c1bf998 100644 (file)
@@ -29,8 +29,6 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
-pragma Ada_2020;
-
 private with GNAT.OS_Lib;
 private with Ada.Finalization;
 package Ada.Strings.Text_Output.Files is
index 58d7f5a4be176a879d87265ffc612f151060c540..f80b30a7d22c8be2f52cf268c1e090f7e6759028 100644 (file)
@@ -29,8 +29,6 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
-pragma Ada_2020;
-
 with Ada.Strings.Text_Output.Files;
 with Ada.Strings.Text_Output.Buffers; use Ada.Strings.Text_Output.Buffers;
 with Ada.Strings.Text_Output.Utils; use Ada.Strings.Text_Output.Utils;
index a31ed2d4c12d948f6655cb27791164f0f3f1d157..3b44bd89be9c57df97b31b0d5d582dfded67e6ae 100644 (file)
@@ -29,8 +29,6 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
-pragma Ada_2020;
-
 package Ada.Strings.Text_Output.Formatting is
 
    --  Template-based output, based loosely on C's printf family. Unlike
index 89d6c6e298fc81a17255a8d66e6b3810e614d910..b5a8f97157033ccf751ee39fe7e9a3fcecb7b5f9 100644 (file)
@@ -29,9 +29,8 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
-pragma Ada_2020;
-
 with Ada.Strings.UTF_Encoding.Wide_Wide_Strings;
+
 package body Ada.Strings.Text_Output.Utils is
 
    procedure Put_Octet (S : in out Sink'Class; Item : Character) with Inline;
index d781a0617aaf3e5003b5f40dd619e83252705390..28d7eca77c6a698b6339279b29aba253f10a0da8 100644 (file)
@@ -29,8 +29,6 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
-pragma Ada_2020;
-
 package Ada.Strings.Text_Output.Utils with Preelaborate is
 
    --  This package provides utility functions on Sink'Class. These are
index 1e2814b6baf9ca97e79086fa7d6fdbdc23aeebe1..ae38b2d87088bf219157084ba910046f17af4872 100644 (file)
@@ -30,7 +30,6 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
-pragma Ada_2020;
 package Ada.Streams.Storage with Pure is
 
    type Storage_Stream_Type is abstract new Root_Stream_Type with private;
index 4bd3c1742547e2e752e5ebe6b6c5c258cdad467d..16c6d009b38aaf8a7567de3293a9cc48a088a345 100644 (file)
@@ -26,7 +26,6 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
-pragma Ada_2020;
 package body Ada.Streams.Storage.Bounded is
 
    ----------
index 1ce6d90f808e700aaf5f89e57733ec9ab4d996c3..fe41c2cea0ebeb4f913c24bb5f4b51170e10a745 100644 (file)
@@ -30,7 +30,6 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
-pragma Ada_2020;
 package Ada.Streams.Storage.Bounded with Pure is
 
    type Stream_Type (Max_Elements : Stream_Element_Count) is
index f2f433be61c8dba1ce2143a6db5cc88b86691f80..cf3a250aab9f516584bb8a124ec05a832cb48dc3 100644 (file)
@@ -26,8 +26,8 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
-pragma Ada_2020;
 with Ada.Unchecked_Deallocation;
+
 package body Ada.Streams.Storage.Unbounded is
 
    procedure Free is new Ada.Unchecked_Deallocation
index 2f01fa097cf07910be581e47e6e7edbd85615c57..95aca9b9269627a522797372b8f7b29b164c32ea 100644 (file)
@@ -30,8 +30,8 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
-pragma Ada_2020;
 private with Ada.Finalization;
+
 package Ada.Streams.Storage.Unbounded with Preelaborate is
 
    type Stream_Type is new Storage_Stream_Type with private with
index f4b8966c1fb76bf1e8c4e0c047a5fec9fdca0529..924b55003c61effcc07f7cd89465933433cfd160 100644 (file)
 --                                                                          --
 ------------------------------------------------------------------------------
 
-pragma Ada_2020;
-
 with Ada.Strings.UTF_Encoding;
 with Ada.Strings.UTF_Encoding.Wide_Wide_Strings;
+
 package Ada.Strings.Text_Output with Preelaborate is
 
    --  This package provides a "Sink" abstraction, to which characters of type
index 17e5cdf224d6cc0a1fe617a17bf77632170b6ae6..558754fd71a269c3868a9a9ec18d60ade99bb10b 100644 (file)
@@ -33,8 +33,6 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
-pragma Ada_2020;
-
 generic
    type Atomic_Type is range <> with Atomic;
 package System.Atomic_Operations.Integer_Arithmetic
index f6057ada439e450a489805c78ac5b0287bde250b..4062d1a4e42ae8d831d57178124541dd9d1ec7c9 100644 (file)
@@ -33,8 +33,6 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
-pragma Ada_2020;
-
 generic
    type Atomic_Type is mod <> with Atomic;
 package System.Atomic_Operations.Modular_Arithmetic
index 11d850ef47e2f88c732832def95859bfbbc02678..996883c973e20dbb12be5f65007f1af1429f5813 100644 (file)
 --                                                                          --
 ------------------------------------------------------------------------------
 
-pragma Ada_2020;
-
 generic
    type Atomic_Type is private with Atomic;
 package System.Atomic_Operations.Exchange
   with Pure
---  Blocking
 is
    function Atomic_Exchange
      (Item  : aliased in out Atomic_Type;
index ed8cfe4b1f97bb2dacf4367550503c8be099b656..08fa7b7609dfee5f2c4a19841f37b12b2ed6e897 100644 (file)
@@ -29,7 +29,6 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
-pragma Ada_2020;
 with Unchecked_Conversion;
 with Ada.Strings.Text_Output.Utils;
 use Ada.Strings.Text_Output;
index c06b75118a1e19ed589a2532cf4c70e3bf4cea53..b4dd8c27e565a5b4c6e020070eb3b499d76ae926 100644 (file)
@@ -29,9 +29,9 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
-pragma Ada_2020;
 with Ada.Strings.Text_Output;
 with Ada.Task_Identification;
+
 package System.Put_Task_Images is
 
    --  This package contains subprograms that are called by the generated code
index 20991c390e51a998a424ff2a37cf740a0af5f391..4ae612d0062f276493940cf65ae8828f84447d7d 100644 (file)
@@ -29,7 +29,6 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
-pragma Ada_2020;
 with Unchecked_Conversion;
 with Ada.Strings.Text_Output.Utils;
 use Ada.Strings.Text_Output;
index d4e4410b35ab8485ddf7d84a39a58088539301f9..17e184a55393d7bc2376a3bc384e0783cd61b7ef 100644 (file)
@@ -29,9 +29,9 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
-pragma Ada_2020;
 with Ada.Strings.Text_Output;
 with System.Unsigned_Types;
+
 package System.Put_Images is
 
    --  This package contains subprograms that are called by the generated code
index 78b2b50e033ebe1288ab315e75665f95d28c63b8..c982f83b9e4a785a2dc16c68d4a5b44550e04e32 100644 (file)
@@ -114,7 +114,7 @@ package Opt is
    --  remains set to Ada_Version_Default). This is used in the rare cases
    --  (notably pragma Obsolescent) where we want the explicit version set.
 
-   Ada_Version_Runtime : Ada_Version_Type := Ada_2012;
+   Ada_Version_Runtime : Ada_Version_Type := Ada_2020;
    --  GNAT
    --  Ada version used to compile the runtime. Used to set Ada_Version (but
    --  not Ada_Version_Explicit) when compiling predefined or internal units.
index 96f05a5eb28243cd6f4999f04814e3431d3be1c2..a5690d62e56cf214d5a7dc8409c0d88e1ebcb4cc 100644 (file)
@@ -5718,11 +5718,13 @@ package body Sem_Ch3 is
 
       --  If the base type is a scalar type, or else if there is no
       --  constraint, the atomic flag is inherited by the subtype.
+      --  Ditto for the Independent aspect.
 
       if Is_Scalar_Type (Id)
         or else Is_Entity_Name (Subtype_Indication (N))
       then
          Set_Is_Atomic (Id, Is_Atomic (T));
+         Set_Is_Independent (Id, Is_Independent (T));
       end if;
 
       --  Remaining processing depends on characteristics of base type