aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/errout.ads
diff options
context:
space:
mode:
authorYannick Moy <moy@adacore.com>2022-06-08 11:58:43 +0200
committerPierre-Marie de Rodat <derodat@adacore.com>2022-07-12 12:24:13 +0000
commitf40948963b0847f995056fef25c41caec5a969e7 (patch)
treeb7cddd8ce9d96e87be0a7537bf39c6510aa1d049 /gcc/ada/errout.ads
parent570f43b823ad9013aab5abd5868b6554f4cf019c (diff)
downloadgcc-f40948963b0847f995056fef25c41caec5a969e7.zip
gcc-f40948963b0847f995056fef25c41caec5a969e7.tar.gz
gcc-f40948963b0847f995056fef25c41caec5a969e7.tar.bz2
[Ada] Ignore switches for controlling frontend warnings in GNATprove mode
In the special mode for GNATprove, ignore switches controlling frontend warnings, like already done for the control of style checks warnings. Also remove special handling of warning mode in Errout to make up for the previous division of control between -gnatw (GNAT) and --warnings (GNATprove). gcc/ada/ * errout.adb (Record_Compilation_Errors): Remove global variable. (Compilation_Errors): Simplify. (Initialize): Inline Reset_Warnings. (Reset_Warnings): Remove. * errout.ads (Reset_Warnings): Remove. (Compilation_Errors): Update comment. * gnat1drv.adb (Adjust_Global_Switches): Ignore all frontend warnings in GNATprove mode, except regarding elaboration and suspicious contracts.
Diffstat (limited to 'gcc/ada/errout.ads')
-rw-r--r--gcc/ada/errout.ads14
1 files changed, 4 insertions, 10 deletions
diff --git a/gcc/ada/errout.ads b/gcc/ada/errout.ads
index c115a1b..45166f5 100644
--- a/gcc/ada/errout.ads
+++ b/gcc/ada/errout.ads
@@ -858,11 +858,6 @@ package Errout is
-- Remove warnings on all elements of a list (Calls Remove_Warning_Messages
-- on each element of the list, see above).
- procedure Reset_Warnings;
- -- Reset the counts related to warnings. This is used both to initialize
- -- these counts and to reset them after each phase of analysis for a given
- -- value of Opt.Warning_Mode in gnat2why.
-
procedure Set_Ignore_Errors (To : Boolean);
-- Following a call to this procedure with To=True, all error calls are
-- ignored. A call with To=False restores the default treatment in which
@@ -910,11 +905,10 @@ package Errout is
-- matching Warnings Off pragma preceding this one.
function Compilation_Errors return Boolean;
- -- Returns True if errors have been detected, or warnings in -gnatwe (treat
- -- warnings as errors) mode. Note that it is mandatory to call Finalize
- -- before calling this routine. To account for changes to Warning_Mode in
- -- gnat2why between phases, the past or current presence of an error is
- -- recorded in a global variable at each call.
+ -- Returns True if errors have been detected, or warnings when they are
+ -- treated as errors, which corresponds to switch -gnatwe in the compiler,
+ -- and other switches in other tools. Note that it is mandatory to call
+ -- Finalize before calling this routine.
procedure Error_Msg_CRT (Feature : String; N : Node_Id);
-- Posts a non-fatal message on node N saying that the feature identified