From: Yannick Moy Date: Wed, 23 May 2018 10:23:14 +0000 (+0000) Subject: [Ada] Clarify meaning of local pragma Warnings Off without On X-Git-Tag: basepoints/gcc-10~6593 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e1c231ec79d0a772c24cb299f88d10ba076e9f2;p=thirdparty%2Fgcc.git [Ada] Clarify meaning of local pragma Warnings Off without On A local use of pragma Warnings Off to suppress specific messages, when not followed by a matching pragma Warnings On, extends until the end of the file. 2018-05-23 Yannick Moy gcc/ada/ * doc/gnat_rm/implementation_defined_pragmas.rst: Clarify meaning of local pragma Warnings Off without On. * gnat_rm.texi: Regenerate. From-SVN: r260589 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 92bfea2d0d67..1f91142fae1b 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2018-05-23 Yannick Moy + + * doc/gnat_rm/implementation_defined_pragmas.rst: Clarify meaning of + local pragma Warnings Off without On. + * gnat_rm.texi: Regenerate. + 2018-05-23 Olivier Hainque * libgnat/g-excact.ads (Is_Foreign_Exception): New predicate. diff --git a/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst b/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst index c3a1ec4ba5f7..73d7db898732 100644 --- a/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst +++ b/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst @@ -7456,6 +7456,10 @@ In this usage, the pattern string must match in the Off and On pragmas, and (if *-gnatw.w* is given) at least one matching warning must be suppressed. +Note: if the ON form is not found, then the effect of the OFF form extends +until the end of the file (pragma Warnings is purely textual, so its effect +does not stop at the end of the enclosing scope). + Note: to write a string that will match any warning, use the string ``"***"``. It will not work to use a single asterisk or two asterisks since this looks like an operator name. This form with three diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi index f4b7f94c0c8f..a0c75753f045 100644 --- a/gcc/ada/gnat_rm.texi +++ b/gcc/ada/gnat_rm.texi @@ -8893,6 +8893,10 @@ In this usage, the pattern string must match in the Off and On pragmas, and (if @emph{-gnatw.w} is given) at least one matching warning must be suppressed. +Note: if the ON form is not found, then the effect of the OFF form extends +until the end of the file (pragma Warnings is purely textual, so its effect +does not stop at the end of the enclosing scope). + Note: to write a string that will match any warning, use the string @code{"***"}. It will not work to use a single asterisk or two asterisks since this looks like an operator name. This form with three