[GNAT] This restriction ensures at compile/bind time that there are no
stream objects created and no use of stream attributes.
This restriction does not forbid dependences on the package
Ada.Streams
. So it is permissible to with
Ada.Streams
(or another package that does so itself)
as long as no actual stream objects are created and no
stream attributes are used.
Note that the use of restriction allows optimization of tagged types, since they do not need to worry about dispatching stream operations. 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.