]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/ada/errout.ads
2017-01-12 Tristan Gingold <gingold@adacore.com>
[thirdparty/gcc.git] / gcc / ada / errout.ads
index e2e7de4a67ed37368436f83e1a001256036ea8c5..a8e4d6c15afdb43dd20ded65e8cad184aafdef0a 100644 (file)
@@ -803,6 +803,11 @@ 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
@@ -852,9 +857,9 @@ package Errout is
    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. Always returns False in formal verification
-   --  mode, because errors issued when analyzing code are not compilation
-   --  errors, and should not result in exiting with an error status.
+   --  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.
 
    procedure Error_Msg_CRT (Feature : String; N : Node_Id);
    --  Posts a non-fatal message on node N saying that the feature identified