+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>
* exp_ch4.adb (Expand_N_Case_Expression): Mark the generated
-- the former is used.
-Other properties are as for standard representation attribute ``Bit_Order``,
-as defined by Ada RM 13.5.3(4). The default is ``System.Default_Bit_Order``.
+Other properties are as for the standard representation attribute ``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
specified explicitly, it shall be equal to ``T'Bit_Order``. Note:
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
-storage order for the derived type. For a record extension, the derived type
-must have the same scalar storage order as the parent type.
+storage order for it. However, for a record extension, the derived type must
+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
not start and end on a byte boundary must have have the same scalar storage
the native ordering of the target, but this default can be overridden using
pragma ``Default_Scalar_Storage_Order``.
-Note that if a component of ``T`` is itself of a record or array type,
-the specfied ``Scalar_Storage_Order`` does *not* apply to that nested type:
-an explicit attribute definition clause must be provided for the component
-type as well if desired.
+If a component of ``T`` is itself of a record or array type, the specfied
+``Scalar_Storage_Order`` does *not* apply to that nested type: an explicit
+attribute definition clause must be provided for the component type as well
+if desired.
Note that the scalar storage order only affects the in-memory data
representation. It has no effect on the representation used by stream
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
-- the former is used.
@end example
-Other properties are as for standard representation attribute @code{Bit_Order},
-as defined by Ada RM 13.5.3(4). The default is @code{System.Default_Bit_Order}.
+Other properties are as for the standard representation attribute @code{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
specified explicitly, it shall be equal to @code{T'Bit_Order}. Note:
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
-storage order for the derived type. For a record extension, the derived type
-must have the same scalar storage order as the parent type.
+storage order for it. However, for a record extension, the derived type must
+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
not start and end on a byte boundary must have have the same scalar storage
the native ordering of the target, but this default can be overridden using
pragma @code{Default_Scalar_Storage_Order}.
-Note that if a component of @code{T} is itself of a record or array type,
-the specfied @code{Scalar_Storage_Order} does @emph{not} apply to that nested type:
-an explicit attribute definition clause must be provided for the component
-type as well if desired.
+If a component of @code{T} is itself of a record or array type, the specfied
+@code{Scalar_Storage_Order} does @emph{not} apply to that nested type: an explicit
+attribute definition clause must be provided for the component type as well
+if desired.
Note that the scalar storage order only affects the in-memory data
representation. It has no effect on the representation used by stream
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
@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