]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Add Default_Initial_Condition to type Unbounded_String
authorJoffrey Huguet <huguet@adacore.com>
Fri, 10 Sep 2021 13:10:33 +0000 (15:10 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 5 Oct 2021 08:20:01 +0000 (08:20 +0000)
gcc/ada/

* libgnat/a-strunb.ads, libgnat/a-strunb__shared.ads: Add
Default_Initial_Condition to Unbounded_String.

gcc/ada/libgnat/a-strunb.ads
gcc/ada/libgnat/a-strunb__shared.ads

index 77d8a59ca4825ecef07955c9fbe01a964f255ba7..b3050fdb5a367121b9e51126b01f4a5fcf73bd7c 100644 (file)
@@ -58,7 +58,8 @@ package Ada.Strings.Unbounded with
 is
    pragma Preelaborate;
 
-   type Unbounded_String is private;
+   type Unbounded_String is private with
+     Default_Initial_Condition => Length (Unbounded_String) = 0;
    pragma Preelaborable_Initialization (Unbounded_String);
 
    Null_Unbounded_String : constant Unbounded_String;
index 2091bde01c8a4bcd48def44d46407c9922a0d489..2cf678002ba8cca28ef917b46ae4b1bab844044d 100644 (file)
@@ -85,7 +85,8 @@ package Ada.Strings.Unbounded with
 is
    pragma Preelaborate;
 
-   type Unbounded_String is private;
+   type Unbounded_String is private with
+     Default_Initial_Condition => Length (Unbounded_String) = 0;
    pragma Preelaborable_Initialization (Unbounded_String);
 
    Null_Unbounded_String : constant Unbounded_String;