Commit 51ab2a39 by Javier Miranda Committed by Pierre-Marie de Rodat

[Ada] Restrict initialization of External_Tag and Expanded_Name

2018-05-23  Javier Miranda  <miranda@adacore.com>

gcc/ada/

	* exp_disp.adb (Make_DT): Restrict the initialization of
	External_Tag and Expanded_Name to an empty string to the case where
	both pragmas apply (i.e. No_Tagged_Streams and Discard_Names), since
	restricted runtimes are compiled with pragma Discard_Names.
	* doc/gnat_rm/implementation_defined_pragmas.rst,
	doc/gnat_rm/implementation_defined_characteristics.rst: Add
	documentation.
	* gnat_rm.texi: Regenerate.

From-SVN: r260584
parent 6734617c
2018-05-23 Javier Miranda <miranda@adacore.com>
* exp_disp.adb (Make_DT): Restrict the initialization of
External_Tag and Expanded_Name to an empty string to the case where
both pragmas apply (i.e. No_Tagged_Streams and Discard_Names), since
restricted runtimes are compiled with pragma Discard_Names.
* doc/gnat_rm/implementation_defined_pragmas.rst,
doc/gnat_rm/implementation_defined_characteristics.rst: Add
documentation.
* gnat_rm.texi: Regenerate.
2018-05-23 Maroua Maalej <maalej@adacore.com>
* sem_spark.adb: Fix of some permission rules of pointers in SPARK.
......
......@@ -875,6 +875,11 @@ be suppressed. In the presence of this pragma, the Image attribute
provides the image of the Pos of the literal, and Value accepts
Pos values.
For tagged types, when pragmas ``Discard_Names`` and ``No_Tagged_Streams``
simultaneously apply, their Expanded_Name and External_Tag are initialized
with empty strings. This is useful to avoid exposing entity names at binary
level.
*
"The result of the ``Task_Identification.Image``
attribute. See C.7.1(7)."
......
......@@ -3892,6 +3892,11 @@ and derived types of this type inherit the pragma automatically, so the effect
applies to a complete hierarchy (this is necessary to deal with the class-wide
dispatching versions of the stream routines).
When pragmas ``Discard_Names`` and ``No_Tagged_Streams`` are simultaneously
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.
Pragma Normalize_Scalars
========================
......
......@@ -21,7 +21,7 @@
@copying
@quotation
GNAT Reference Manual , Apr 20, 2018
GNAT Reference Manual , Apr 23, 2018
AdaCore
......@@ -5328,6 +5328,11 @@ and derived types of this type inherit the pragma automatically, so the effect
applies to a complete hierarchy (this is necessary to deal with the class-wide
dispatching versions of the stream routines).
When pragmas @code{Discard_Names} and @code{No_Tagged_Streams} are simultaneously
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.
@node Pragma Normalize_Scalars,Pragma Obsolescent,Pragma No_Tagged_Streams,Implementation Defined Pragmas
@anchor{gnat_rm/implementation_defined_pragmas pragma-normalize-scalars}@anchor{a8}
@section Pragma Normalize_Scalars
......@@ -17143,6 +17148,11 @@ be suppressed. In the presence of this pragma, the Image attribute
provides the image of the Pos of the literal, and Value accepts
Pos values.
For tagged types, when pragmas @code{Discard_Names} and @code{No_Tagged_Streams}
simultaneously apply, their Expanded_Name and External_Tag are initialized
with empty strings. This is useful to avoid exposing entity names at binary
level.
@itemize *
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment