Commit 5e1c231e by Yannick Moy Committed by Pierre-Marie de Rodat

[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  <moy@adacore.com>

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
parent b682fcf0
2018-05-23 Yannick Moy <moy@adacore.com>
* 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 <hainque@adacore.com> 2018-05-23 Olivier Hainque <hainque@adacore.com>
* libgnat/g-excact.ads (Is_Foreign_Exception): New predicate. * libgnat/g-excact.ads (Is_Foreign_Exception): New predicate.
......
...@@ -7456,6 +7456,10 @@ In this usage, the pattern string must match in the Off and On ...@@ -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 pragmas, and (if *-gnatw.w* is given) at least one matching
warning must be suppressed. 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 Note: to write a string that will match any warning, use the string
``"***"``. It will not work to use a single asterisk or two ``"***"``. It will not work to use a single asterisk or two
asterisks since this looks like an operator name. This form with three asterisks since this looks like an operator name. This form with three
......
...@@ -8893,6 +8893,10 @@ In this usage, the pattern string must match in the Off and On ...@@ -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 pragmas, and (if @emph{-gnatw.w} is given) at least one matching
warning must be suppressed. 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 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 @code{"***"}. It will not work to use a single asterisk or two
asterisks since this looks like an operator name. This form with three asterisks since this looks like an operator name. This form with three
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