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.
-- 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
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;
-- 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.
return;
end if;
- if Raise_Exception_On_Error /= 0 then
- raise Error_Msg_Exception;
- end if;
-
Prescan_Message (Msg);
Set_Msg_Text (Msg, Sptr);