]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Remove Raise_Exception_On_Error
authorViljar Indus <indus@adacore.com>
Mon, 4 Nov 2024 12:16:02 +0000 (14:16 +0200)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Tue, 26 Nov 2024 09:49:35 +0000 (10:49 +0100)
Raise_Exception_On_Error is never modified so it can be removed.

gcc/ada/ChangeLog:

* err_vars.ads: Remove Raise_Exception_On_Error and
Error_Msg_Exception.
* errout.ads: Same as above.
* errout.adb: Remove uses of Raise_Exception_On_Error and
Error_Msg_Exception.
* errutil.adb: Same as above.

gcc/ada/err_vars.ads
gcc/ada/errout.adb
gcc/ada/errout.ads
gcc/ada/errutil.adb

index 838217b95f4328b704072bf15a4b5e7911246545..13b68be4b596dd451919253062aed1def4ecb4a5 100644 (file)
@@ -55,17 +55,6 @@ package Err_Vars is
    --  not get reset by any Error_Msg call, so the caller is responsible
    --  for resetting it.
 
-   Raise_Exception_On_Error : Nat := 0;
-   --  If this value is non-zero, then any attempt to generate an error
-   --  message raises the exception Error_Msg_Exception, and the error
-   --  message is not output. This is used for defending against junk
-   --  resulting from illegalities, and also for substitution of more
-   --  appropriate error messages from higher semantic levels. It is
-   --  a counter so that the increment/decrement protocol nests neatly.
-
-   Error_Msg_Exception : exception;
-   --  Exception raised if Raise_Exception_On_Error is true
-
    Current_Error_Source_File : Source_File_Index := No_Source_File;
    --  Id of current messages. Used to post file name when unit changes. This
    --  is initialized to Main_Source_File at the start of a compilation, which
index a569b61c43f92c1b33791f7cc1335b34a4fdbb8c..84958a743119c95b196bf7f9f1b6e5446783ac9e 100644 (file)
@@ -996,10 +996,6 @@ package body Errout is
 
       pragma Assert (Msg (Msg'First) /= ' ' and then Msg (Msg'Last) /= ' ');
 
-      if Raise_Exception_On_Error /= 0 then
-         raise Error_Msg_Exception;
-      end if;
-
       Continuation := Msg_Cont;
       Continuation_New_Line := False;
       Suppress_Message := False;
index fce7d9b502ad7810ab8767a5d3494087fef808d7..3c0c2cecf68d57b05ede9e78b502d1fa9cad13ab 100644 (file)
@@ -48,17 +48,6 @@ package Errout is
    --  Source_Reference line, then this is initialized to No_Source_File, to
    --  force an initial reference to the real source file name.
 
-   Raise_Exception_On_Error : Nat renames Err_Vars.Raise_Exception_On_Error;
-   --  If this value is non-zero, then any attempt to generate an error
-   --  message raises the exception Error_Msg_Exception, and the error message
-   --  is not output. This is used for defending against junk resulting from
-   --  illegalities, and also for substitution of more appropriate error
-   --  messages from higher semantic levels. It is a counter so that the
-   --  increment/decrement protocol nests neatly.
-
-   Error_Msg_Exception : exception renames Err_Vars.Error_Msg_Exception;
-   --  Exception raised if Raise_Exception_On_Error is true
-
    Current_Node : Node_Id := Empty;
    --  Used by Error_Msg as a default Node_Id.
    --  Relevant only when Opt.Include_Subprogram_In_Messages is set.
index 450be6b930268fddf9e5b2a1cb47de1cbbecafc8..ab320be33904f14ba6e16edcdad33b9be0784e6f 100644 (file)
@@ -172,10 +172,6 @@ package body Errutil is
          return;
       end if;
 
-      if Raise_Exception_On_Error /= 0 then
-         raise Error_Msg_Exception;
-      end if;
-
       Prescan_Message (Msg);
       Set_Msg_Text (Msg, Sptr);