From: Viljar Indus Date: Mon, 4 Nov 2024 12:16:02 +0000 (+0200) Subject: ada: Remove Raise_Exception_On_Error X-Git-Tag: basepoints/gcc-16~3870 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2364e96f011d33698a6366f414aa813c5f9adc8b;p=thirdparty%2Fgcc.git ada: Remove Raise_Exception_On_Error 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. --- diff --git a/gcc/ada/err_vars.ads b/gcc/ada/err_vars.ads index 838217b95f43..13b68be4b596 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 a569b61c43f9..84958a743119 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 fce7d9b502ad..3c0c2cecf68d 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 450be6b93026..ab320be33904 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);