From: Viljar Indus <in...@adacore.com> 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. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/err_vars.ads | 11 ----------- gcc/ada/errout.adb | 4 ---- gcc/ada/errout.ads | 11 ----------- gcc/ada/errutil.adb | 4 ---- 4 files changed, 30 deletions(-) diff --git a/gcc/ada/err_vars.ads b/gcc/ada/err_vars.ads index 838217b95f4..13b68be4b59 100644 --- a/gcc/ada/err_vars.ads +++ b/gcc/ada/err_vars.ads @@ -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 diff --git a/gcc/ada/errout.adb b/gcc/ada/errout.adb index a569b61c43f..84958a74311 100644 --- a/gcc/ada/errout.adb +++ b/gcc/ada/errout.adb @@ -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; diff --git a/gcc/ada/errout.ads b/gcc/ada/errout.ads index fce7d9b502a..3c0c2cecf68 100644 --- a/gcc/ada/errout.ads +++ b/gcc/ada/errout.ads @@ -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. diff --git a/gcc/ada/errutil.adb b/gcc/ada/errutil.adb index 450be6b9302..ab320be3390 100644 --- a/gcc/ada/errutil.adb +++ b/gcc/ada/errutil.adb @@ -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); -- 2.43.0