From 1c6f14b64b4e4bf1a01efe41c013f690b22bdce2 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Wed, 10 Jul 2019 09:01:43 +0000 Subject: [PATCH] [Ada] GNAT RM: add note about debuggers for Scalar_Storage_Order 2019-07-10 Eric Botcazou 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 --- gcc/ada/ChangeLog | 6 ++++++ .../implementation_defined_attributes.rst | 19 +++++++++++-------- gcc/ada/gnat_rm.texi | 19 +++++++++++-------- 3 files changed, 28 insertions(+), 16 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index adcb6a94c56..e870be4cc00 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2019-07-10 Eric Botcazou + + * 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 * exp_ch4.adb (Expand_N_Case_Expression): Mark the generated diff --git a/gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst b/gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst index 0b4f780bd25..c75d9948ae8 100644 --- a/gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst +++ b/gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst @@ -967,8 +967,8 @@ of the use of this feature: -- 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: @@ -978,8 +978,8 @@ specified explicitly and set to the same value. 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 @@ -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 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 diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi index 2de8802091f..597752fb1c1 100644 --- a/gcc/ada/gnat_rm.texi +++ b/gcc/ada/gnat_rm.texi @@ -11270,8 +11270,8 @@ for Date'Scalar_Storage_Order use System.High_Order_First; -- 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: @@ -11281,8 +11281,8 @@ specified explicitly and set to the same value. 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 @@ -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 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 -- 2.30.2