From: Justin Squirek Date: Wed, 10 Jul 2019 09:02:17 +0000 (+0000) Subject: [Ada] Documentation of Img attribute out of date X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=764ffff09accf270243f43d0a8ad1e34d9883eec;p=gcc.git [Ada] Documentation of Img attribute out of date 2019-07-10 Justin Squirek gcc/ada/ * doc/gnat_rm/implementation_defined_attributes.rst: Add mention of 'Image attribute with 'Img's entry to mention additional added 2012 usage of Obj'Image. * doc/gnat_rm/implementation_defined_pragmas.rst: Correct mispelling of Async_Writers. * gnat_rm.texi: Regenerate. * sem_prag.adb (Analyze_Pragma): Correct mispelling of Async_Writers. * sem_util.adb (State_Has_Enabled_Property): Correct mispelling of Async_Writers. From-SVN: r273344 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 7e609bdc049..9e9e19ddb10 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,16 @@ +2019-07-10 Justin Squirek + + * doc/gnat_rm/implementation_defined_attributes.rst: Add mention + of 'Image attribute with 'Img's entry to mention additional + added 2012 usage of Obj'Image. + * doc/gnat_rm/implementation_defined_pragmas.rst: Correct + mispelling of Async_Writers. + * gnat_rm.texi: Regenerate. + * sem_prag.adb (Analyze_Pragma): Correct mispelling of + Async_Writers. + * sem_util.adb (State_Has_Enabled_Property): Correct mispelling + of Async_Writers. + 2019-07-10 Simon Buist * sem_util.ads (Child_Prefix): New constant. diff --git a/gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst b/gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst index c75d9948ae8..db75ea73d8b 100644 --- a/gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst +++ b/gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst @@ -479,17 +479,17 @@ Attribute Img ============= .. index:: Img -The ``Img`` attribute differs from ``Image`` in that it is applied -directly to an object, and yields the same result as -``Image`` for the subtype of the object. This is convenient for -debugging: +The ``Img`` attribute differs from ``Image`` in that, while both can be +applied directly to an object, ``Img`` cannot be applied to types. + +Example usage of the attribute: .. code-block:: ada Put_Line ("X = " & X'Img); -has the same meaning as the more verbose: +which has the same meaning as the more verbose: .. code-block:: ada diff --git a/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst b/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst index dff7798ed7d..04b0def1a3a 100644 --- a/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst +++ b/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst @@ -719,7 +719,7 @@ Syntax: .. code-block:: ada - pragma Asynch_Readers [ (boolean_EXPRESSION) ]; + pragma Async_Readers [ (boolean_EXPRESSION) ]; For the semantics of this pragma, see the entry for aspect ``Async_Readers`` in the SPARK 2014 Reference Manual, section 7.1.2. @@ -733,7 +733,7 @@ Syntax: .. code-block:: ada - pragma Asynch_Writers [ (boolean_EXPRESSION) ]; + pragma Async_Writers [ (boolean_EXPRESSION) ]; For the semantics of this pragma, see the entry for aspect ``Async_Writers`` in the SPARK 2014 Reference Manual, section 7.1.2. diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi index 77f91b0d159..257c3948b8f 100644 --- a/gcc/ada/gnat_rm.texi +++ b/gcc/ada/gnat_rm.texi @@ -2104,7 +2104,7 @@ case, and it is recommended that these two options not be used together. Syntax: @example -pragma Asynch_Readers [ (boolean_EXPRESSION) ]; +pragma Async_Readers [ (boolean_EXPRESSION) ]; @end example For the semantics of this pragma, see the entry for aspect @code{Async_Readers} in @@ -2118,7 +2118,7 @@ the SPARK 2014 Reference Manual, section 7.1.2. Syntax: @example -pragma Asynch_Writers [ (boolean_EXPRESSION) ]; +pragma Async_Writers [ (boolean_EXPRESSION) ]; @end example For the semantics of this pragma, see the entry for aspect @code{Async_Writers} in @@ -10713,16 +10713,16 @@ indicates whether or not the corresponding actual type has discriminants. @geindex Img -The @code{Img} attribute differs from @code{Image} in that it is applied -directly to an object, and yields the same result as -@code{Image} for the subtype of the object. This is convenient for -debugging: +The @code{Img} attribute differs from @code{Image} in that, while both can be +applied directly to an object, @code{Img} cannot be applied to types. + +Example usage of the attribute: @example Put_Line ("X = " & X'Img); @end example -has the same meaning as the more verbose: +which has the same meaning as the more verbose: @example Put_Line ("X = " & T'Image (X)); diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 7a4857ff108..969820ee6f2 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -13620,8 +13620,8 @@ package body Sem_Prag is -- Async_Readers/Async_Writers/Effective_Reads/Effective_Writes -- ------------------------------------------------------------------ - -- pragma Asynch_Readers [ (boolean_EXPRESSION) ]; - -- pragma Asynch_Writers [ (boolean_EXPRESSION) ]; + -- pragma Async_Readers [ (boolean_EXPRESSION) ]; + -- pragma Async_Writers [ (boolean_EXPRESSION) ]; -- pragma Effective_Reads [ (boolean_EXPRESSION) ]; -- pragma Effective_Writes [ (boolean_EXPRESSION) ]; diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 448eea15e6d..b6a31e6a9c8 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -10813,8 +10813,8 @@ package body Sem_Util is -- Simple option Synchronous -- -- enables disables - -- Asynch_Readers Effective_Reads - -- Asynch_Writers Effective_Writes + -- Async_Readers Effective_Reads + -- Async_Writers Effective_Writes -- -- Note that both forms of External have higher precedence than -- Synchronous (SPARK RM 7.1.4(9)).