* [COMMITTED] ada: Add No_Elaboration_Code_All pragma to System.Storage_Elements
@ 2023-06-13 7:38 Marc Poulhiès
0 siblings, 0 replies; only message in thread
From: Marc Poulhiès @ 2023-06-13 7:38 UTC (permalink / raw)
To: gcc-patches; +Cc: Daniel King
From: Daniel King <dmking@adacore.com>
Allows System.Storage_Elements to be used in units that
have the No_Elaboration_Code_All restriction.
gcc/ada/
* libgnat/s-stoele.ads: Add No_Elaboration_Code_All pragma.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/libgnat/s-stoele.ads | 3 +++
1 file changed, 3 insertions(+)
diff --git a/gcc/ada/libgnat/s-stoele.ads b/gcc/ada/libgnat/s-stoele.ads
index 3262d0329c3..7de150dab59 100644
--- a/gcc/ada/libgnat/s-stoele.ads
+++ b/gcc/ada/libgnat/s-stoele.ads
@@ -43,6 +43,9 @@ package System.Storage_Elements is
-- this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada 2005,
-- this is Pure in any case (AI-362).
+ pragma No_Elaboration_Code_All;
+ -- Allow the use of that restriction in units that WITH this unit
+
pragma Annotate (GNATprove, Always_Return, Storage_Elements);
type Storage_Offset is range -Memory_Size / 2 .. Memory_Size / 2 - 1;
--
2.40.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-06-13 7:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-13 7:38 [COMMITTED] ada: Add No_Elaboration_Code_All pragma to System.Storage_Elements Marc Poulhiès
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).