[Ada] Ignore switches for controlling frontend warnings in GNATprove mode
commitf40948963b0847f995056fef25c41caec5a969e7
authorYannick Moy <moy@adacore.com>
Wed, 8 Jun 2022 09:58:43 +0000 (8 11:58 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 12 Jul 2022 12:24:13 +0000 (12 12:24 +0000)
treeb7cddd8ce9d96e87be0a7537bf39c6510aa1d049
parent570f43b823ad9013aab5abd5868b6554f4cf019c
[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.
gcc/ada/errout.adb
gcc/ada/errout.ads
gcc/ada/gnat1drv.adb