aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2024-04-03 13:02:12 +0200
committerMarc Poulhiès <poulhies@adacore.com>2024-06-10 11:03:59 +0200
commit3da7847e82e8416af107a64fa980ae0f7cf0a110 (patch)
treefdbfd5aeed389937b5e2233ba7bc3888ea9c46e5 /gcc
parente425edc58025990c01a25c9a8be016a2f41e787e (diff)
downloadgcc-3da7847e82e8416af107a64fa980ae0f7cf0a110.zip
gcc-3da7847e82e8416af107a64fa980ae0f7cf0a110.tar.gz
gcc-3da7847e82e8416af107a64fa980ae0f7cf0a110.tar.bz2
ada: Adjust comments and doc about the new use of restriction No_Streams
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.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst6
-rw-r--r--gcc/ada/doc/gnat_rm/standard_and_implementation_defined_restrictions.rst6
-rw-r--r--gcc/ada/exp_disp.adb4
-rw-r--r--gcc/ada/gnat_rm.texi14
-rw-r--r--gcc/ada/gnat_ugn.texi4
5 files changed, 19 insertions, 15 deletions
diff --git a/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst b/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst
index 7e4dd93..0661670 100644
--- a/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst
+++ b/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst
@@ -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
========================
diff --git a/gcc/ada/doc/gnat_rm/standard_and_implementation_defined_restrictions.rst b/gcc/ada/doc/gnat_rm/standard_and_implementation_defined_restrictions.rst
index 5c023239..cf4657b 100644
--- a/gcc/ada/doc/gnat_rm/standard_and_implementation_defined_restrictions.rst
+++ b/gcc/ada/doc/gnat_rm/standard_and_implementation_defined_restrictions.rst
@@ -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
diff --git a/gcc/ada/exp_disp.adb b/gcc/ada/exp_disp.adb
index 66be77c..1a19c1e 100644
--- a/gcc/ada/exp_disp.adb
+++ b/gcc/ada/exp_disp.adb
@@ -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))
diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi
index 776dd4a..1e6fb09 100644
--- a/gcc/ada/gnat_rm.texi
+++ b/gcc/ada/gnat_rm.texi
@@ -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
diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi
index 2df2a78..73f496f 100644
--- a/gcc/ada/gnat_ugn.texi
+++ b/gcc/ada/gnat_ugn.texi
@@ -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