]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Adjust comments and doc about the new use of restriction No_Streams
authorPiotr Trojanek <trojanek@adacore.com>
Wed, 3 Apr 2024 11:02:12 +0000 (13:02 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Mon, 10 Jun 2024 09:03:59 +0000 (11:03 +0200)
Extend code comment; move recently added documentation from pragma
No_Tagged_Streams to restriction No_Streams.

gcc/ada/

* doc/gnat_rm/implementation_defined_pragmas.rst
(No_Tagged_Streams): Move documentation.
* doc/gnat_rm/standard_and_implementation_defined_restrictions.rst
(No_Streams): Likewise.
* exp_disp.adb (Make_DT): Extend comment.
* gnat_rm.texi: Regenerate.
* gnat_ugn.texi: Regenerate.

gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst
gcc/ada/doc/gnat_rm/standard_and_implementation_defined_restrictions.rst
gcc/ada/exp_disp.adb
gcc/ada/gnat_rm.texi
gcc/ada/gnat_ugn.texi

index 7e4dd9353426fb8326a391547ddc33f32b94070c..0661670e0475159d104ce997896e4011a6bb75f7 100644 (file)
@@ -4000,12 +4000,6 @@ applied to a tagged type its Expanded_Name and External_Tag are initialized
 with empty strings. This is useful to avoid exposing entity names at binary
 level but has a negative impact on the debuggability of tagged types.
 
-Alternatively, when pragmas ``Discard_Names`` and ``Restrictions (No_Streams)``
-simultanously apply to a tagged type, its Expanded_Name and External_Tag are
-also initialized with empty strings. In particular, both these pragmas can be
-applied as configuration pragmas to avoid exposing entity names at binary
-level for the entire parition.
-
 Pragma Normalize_Scalars
 ========================
 
index 5c023239163cf7d9c6dc5bea5ba3bc7888c65994..cf4657b7050f8245d6ed4594d8bcd24b7b716e2b 100644 (file)
@@ -675,6 +675,12 @@ To take maximum advantage of this space-saving optimization, any
 unit declaring a tagged type should be compiled with the restriction,
 though this is not required.
 
+When pragmas ``Discard_Names`` and ``Restrictions (No_Streams)`` simultaneously
+apply to a tagged type, its Expanded_Name and External_Tag are also initialized
+with empty strings. In particular, both these pragmas can be applied as
+configuration pragmas to avoid exposing entity names at binary level for the
+entire partition.
+
 No_Tagged_Type_Registration
 ---------------------------
 .. index:: No_Tagged_Type_Registration
index 66be77c9ffca4d2c4e79e7672702e9ed8332c510..1a19c1e33037de1eb63d37787ed53d1547423a80 100644 (file)
@@ -4598,6 +4598,10 @@ package body Exp_Disp is
       --    (2) External_Tag (combined with Internal_Tag) is used for object
       --        streaming and No_Tagged_Streams inhibits the generation of
       --        streams.
+      --  Instead of No_Tagged_Streams, which applies either to a single
+      --  type or to a declarative region, it is possible to use restriction
+      --  No_Streams, which prevents stream objects from being created in the
+      --  entire partition.
 
       Discard_Names : constant Boolean :=
         (Present (No_Tagged_Streams_Pragma (Typ))
index 776dd4a4afcf016b700432569fa3dd760f78be6b..1e6fb0936725b16c758b3f2fe2cc41f1080ef7a3 100644 (file)
@@ -19,7 +19,7 @@
 
 @copying
 @quotation
-GNAT Reference Manual , Apr 16, 2024
+GNAT Reference Manual , May 28, 2024
 
 AdaCore
 
@@ -5535,12 +5535,6 @@ applied to a tagged type its Expanded_Name and External_Tag are initialized
 with empty strings. This is useful to avoid exposing entity names at binary
 level but has a negative impact on the debuggability of tagged types.
 
-Alternatively, when pragmas @code{Discard_Names} and @code{Restrictions (No_Streams)}
-simultanously apply to a tagged type, its Expanded_Name and External_Tag are
-also initialized with empty strings. In particular, both these pragmas can be
-applied as configuration pragmas to avoid exposing entity names at binary
-level for the entire parition.
-
 @node Pragma Normalize_Scalars,Pragma Obsolescent,Pragma No_Tagged_Streams,Implementation Defined Pragmas
 @anchor{gnat_rm/implementation_defined_pragmas pragma-normalize-scalars}@anchor{b0}
 @section Pragma Normalize_Scalars
@@ -13246,6 +13240,12 @@ To take maximum advantage of this space-saving optimization, any
 unit declaring a tagged type should be compiled with the restriction,
 though this is not required.
 
+When pragmas @code{Discard_Names} and @code{Restrictions (No_Streams)} simultaneously
+apply to a tagged type, its Expanded_Name and External_Tag are also initialized
+with empty strings. In particular, both these pragmas can be applied as
+configuration pragmas to avoid exposing entity names at binary level for the
+entire partition.
+
 @node No_Tagged_Type_Registration,No_Task_Allocators,No_Streams,Partition-Wide Restrictions
 @anchor{gnat_rm/standard_and_implementation_defined_restrictions no-tagged-type-registration}@anchor{205}
 @subsection No_Tagged_Type_Registration
index 2df2a780ec79d3d060d58d0a4e7eaa02e689f18e..73f496fcdabc5342a67c7aa043d853a3279a6c52 100644 (file)
@@ -19,7 +19,7 @@
 
 @copying
 @quotation
-GNAT User's Guide for Native Platforms , Apr 16, 2024
+GNAT User's Guide for Native Platforms , May 28, 2024
 
 AdaCore
 
@@ -29645,8 +29645,8 @@ to permit their use in free software.
 
 @printindex ge
 
-@anchor{d1}@w{                              }
 @anchor{gnat_ugn/gnat_utility_programs switches-related-to-project-files}@w{                              }
+@anchor{d1}@w{                              }
 
 @c %**end of body
 @bye