Commit 1c6f14b6 by Eric Botcazou Committed by Pierre-Marie de Rodat

[Ada] GNAT RM: add note about debuggers for Scalar_Storage_Order

2019-07-10  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

	* doc/gnat_rm/implementation_defined_attributes.rst
	(Scalar_Storage_Order): Minor tweaks.  Add note about debuggers.
	* gnat_rm.texi: Regenerate.

From-SVN: r273337
parent 5b4ce2a0
2019-07-10 Eric Botcazou <ebotcazou@adacore.com>
* doc/gnat_rm/implementation_defined_attributes.rst
(Scalar_Storage_Order): Minor tweaks. Add note about debuggers.
* gnat_rm.texi: Regenerate.
2019-07-10 Hristian Kirtchev <kirtchev@adacore.com> 2019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch4.adb (Expand_N_Case_Expression): Mark the generated * exp_ch4.adb (Expand_N_Case_Expression): Mark the generated
......
...@@ -967,8 +967,8 @@ of the use of this feature: ...@@ -967,8 +967,8 @@ of the use of this feature:
-- the former is used. -- the former is used.
Other properties are as for standard representation attribute ``Bit_Order``, Other properties are as for the standard representation attribute ``Bit_Order``
as defined by Ada RM 13.5.3(4). The default is ``System.Default_Bit_Order``. defined by Ada RM 13.5.3(4). The default is ``System.Default_Bit_Order``.
For a record type ``T``, if ``T'Scalar_Storage_Order`` is For a record type ``T``, if ``T'Scalar_Storage_Order`` is
specified explicitly, it shall be equal to ``T'Bit_Order``. Note: specified explicitly, it shall be equal to ``T'Bit_Order``. Note:
...@@ -978,8 +978,8 @@ specified explicitly and set to the same value. ...@@ -978,8 +978,8 @@ specified explicitly and set to the same value.
Derived types inherit an explicitly set scalar storage order from their parent Derived types inherit an explicitly set scalar storage order from their parent
types. This may be overridden for the derived type by giving an explicit scalar types. This may be overridden for the derived type by giving an explicit scalar
storage order for the derived type. For a record extension, the derived type storage order for it. However, for a record extension, the derived type must
must have the same scalar storage order as the parent type. have the same scalar storage order as the parent type.
A component of a record type that is itself a record or an array and that does A component of a record type that is itself a record or an array and that does
not start and end on a byte boundary must have have the same scalar storage not start and end on a byte boundary must have have the same scalar storage
...@@ -1018,15 +1018,18 @@ inheritance in the case of a derived type), then the default is normally ...@@ -1018,15 +1018,18 @@ inheritance in the case of a derived type), then the default is normally
the native ordering of the target, but this default can be overridden using the native ordering of the target, but this default can be overridden using
pragma ``Default_Scalar_Storage_Order``. pragma ``Default_Scalar_Storage_Order``.
Note that if a component of ``T`` is itself of a record or array type, If a component of ``T`` is itself of a record or array type, the specfied
the specfied ``Scalar_Storage_Order`` does *not* apply to that nested type: ``Scalar_Storage_Order`` does *not* apply to that nested type: an explicit
an explicit attribute definition clause must be provided for the component attribute definition clause must be provided for the component type as well
type as well if desired. if desired.
Note that the scalar storage order only affects the in-memory data Note that the scalar storage order only affects the in-memory data
representation. It has no effect on the representation used by stream representation. It has no effect on the representation used by stream
attributes. attributes.
Note that debuggers may be unable to display the correct value of scalar
components of a type for which the opposite storage order is specified.
.. _Attribute_Simple_Storage_Pool: .. _Attribute_Simple_Storage_Pool:
Attribute Simple_Storage_Pool Attribute Simple_Storage_Pool
......
...@@ -11270,8 +11270,8 @@ for Date'Scalar_Storage_Order use System.High_Order_First; ...@@ -11270,8 +11270,8 @@ for Date'Scalar_Storage_Order use System.High_Order_First;
-- the former is used. -- the former is used.
@end example @end example
Other properties are as for standard representation attribute @code{Bit_Order}, Other properties are as for the standard representation attribute @code{Bit_Order}
as defined by Ada RM 13.5.3(4). The default is @code{System.Default_Bit_Order}. defined by Ada RM 13.5.3(4). The default is @code{System.Default_Bit_Order}.
For a record type @code{T}, if @code{T'Scalar_Storage_Order} is For a record type @code{T}, if @code{T'Scalar_Storage_Order} is
specified explicitly, it shall be equal to @code{T'Bit_Order}. Note: specified explicitly, it shall be equal to @code{T'Bit_Order}. Note:
...@@ -11281,8 +11281,8 @@ specified explicitly and set to the same value. ...@@ -11281,8 +11281,8 @@ specified explicitly and set to the same value.
Derived types inherit an explicitly set scalar storage order from their parent Derived types inherit an explicitly set scalar storage order from their parent
types. This may be overridden for the derived type by giving an explicit scalar types. This may be overridden for the derived type by giving an explicit scalar
storage order for the derived type. For a record extension, the derived type storage order for it. However, for a record extension, the derived type must
must have the same scalar storage order as the parent type. have the same scalar storage order as the parent type.
A component of a record type that is itself a record or an array and that does A component of a record type that is itself a record or an array and that does
not start and end on a byte boundary must have have the same scalar storage not start and end on a byte boundary must have have the same scalar storage
...@@ -11332,15 +11332,18 @@ inheritance in the case of a derived type), then the default is normally ...@@ -11332,15 +11332,18 @@ inheritance in the case of a derived type), then the default is normally
the native ordering of the target, but this default can be overridden using the native ordering of the target, but this default can be overridden using
pragma @code{Default_Scalar_Storage_Order}. pragma @code{Default_Scalar_Storage_Order}.
Note that if a component of @code{T} is itself of a record or array type, If a component of @code{T} is itself of a record or array type, the specfied
the specfied @code{Scalar_Storage_Order} does @emph{not} apply to that nested type: @code{Scalar_Storage_Order} does @emph{not} apply to that nested type: an explicit
an explicit attribute definition clause must be provided for the component attribute definition clause must be provided for the component type as well
type as well if desired. if desired.
Note that the scalar storage order only affects the in-memory data Note that the scalar storage order only affects the in-memory data
representation. It has no effect on the representation used by stream representation. It has no effect on the representation used by stream
attributes. attributes.
Note that debuggers may be unable to display the correct value of scalar
components of a type for which the opposite storage order is specified.
@node Attribute Simple_Storage_Pool,Attribute Small,Attribute Scalar_Storage_Order,Implementation Defined Attributes @node Attribute Simple_Storage_Pool,Attribute Small,Attribute Scalar_Storage_Order,Implementation Defined Attributes
@anchor{gnat_rm/implementation_defined_attributes attribute-simple-storage-pool}@anchor{e7}@anchor{gnat_rm/implementation_defined_attributes id5}@anchor{19c} @anchor{gnat_rm/implementation_defined_attributes attribute-simple-storage-pool}@anchor{e7}@anchor{gnat_rm/implementation_defined_attributes id5}@anchor{19c}
@section Attribute Simple_Storage_Pool @section Attribute Simple_Storage_Pool
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