public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Pierre-Marie de Rodat <pmderodat@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r12-4156] [Ada] Add Default_Initial_Condition to type Unbounded_String
Date: Tue,  5 Oct 2021 08:23:05 +0000 (GMT)	[thread overview]
Message-ID: <20211005082305.93D36385701C@sourceware.org> (raw)

https://gcc.gnu.org/g:04175813f920e8cb8ca146fb88a74edb33636b88

commit r12-4156-g04175813f920e8cb8ca146fb88a74edb33636b88
Author: Joffrey Huguet <huguet@adacore.com>
Date:   Fri Sep 10 15:10:33 2021 +0200

    [Ada] Add Default_Initial_Condition to type Unbounded_String
    
    gcc/ada/
    
            * libgnat/a-strunb.ads, libgnat/a-strunb__shared.ads: Add
            Default_Initial_Condition to Unbounded_String.

Diff:
---
 gcc/ada/libgnat/a-strunb.ads         | 3 ++-
 gcc/ada/libgnat/a-strunb__shared.ads | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/gcc/ada/libgnat/a-strunb.ads b/gcc/ada/libgnat/a-strunb.ads
index 77d8a59ca48..b3050fdb5a3 100644
--- a/gcc/ada/libgnat/a-strunb.ads
+++ b/gcc/ada/libgnat/a-strunb.ads
@@ -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;
diff --git a/gcc/ada/libgnat/a-strunb__shared.ads b/gcc/ada/libgnat/a-strunb__shared.ads
index 2091bde01c8..2cf678002ba 100644
--- a/gcc/ada/libgnat/a-strunb__shared.ads
+++ b/gcc/ada/libgnat/a-strunb__shared.ads
@@ -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;


                 reply	other threads:[~2021-10-05  8:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211005082305.93D36385701C@sourceware.org \
    --to=pmderodat@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).