diff options
Diffstat (limited to 'gcc/ada/errout.adb')
-rw-r--r-- | gcc/ada/errout.adb | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/gcc/ada/errout.adb b/gcc/ada/errout.adb index b8d044e3d34..5e3e72381fd 100644 --- a/gcc/ada/errout.adb +++ b/gcc/ada/errout.adb @@ -153,8 +153,7 @@ package body Errout is -- be one of the special insertion characters (see documentation in spec). -- Flag is the location at which the error is to be posted, which is used -- to determine whether or not the # insertion needs a file name. The - -- variables Msg_Buffer, Msglen, Is_Style_Msg, Is_Warning_Msg, and - -- Is_Unconditional_Msg are set on return. + -- variables Msg_Buffer are set on return Msglen. procedure Set_Posted (N : Node_Id); -- Sets the Error_Posted flag on the given node, and all its parents @@ -283,7 +282,7 @@ package body Errout is -- Start of processing for new message Sindex := Get_Source_File_Index (Flag_Location); - Test_Style_Warning_Serious_Msg (Msg); + Test_Style_Warning_Serious_Unconditional_Msg (Msg); Orig_Loc := Original_Location (Flag_Location); -- If the current location is in an instantiation, the issue arises of @@ -726,7 +725,7 @@ package body Errout is if Suppress_Message and then not All_Errors_Mode and then not Is_Warning_Msg - and then Msg (Msg'Last) /= '!' + and then not Is_Unconditional_Msg then if not Continuation then Last_Killed := True; @@ -787,9 +786,9 @@ package body Errout is elsif Debug_Flag_GG then null; - -- Keep warning if message text ends in !! + -- Keep warning if message text contains !! - elsif Msg (Msg'Last) = '!' and then Msg (Msg'Last - 1) = '!' then + elsif Has_Double_Exclam then null; -- Here is where we delete a warning from a with'ed unit @@ -1123,7 +1122,7 @@ package body Errout is return; end if; - Test_Style_Warning_Serious_Msg (Msg); + Test_Style_Warning_Serious_Unconditional_Msg (Msg); -- Special handling for warning messages @@ -1163,7 +1162,7 @@ package body Errout is -- Test for message to be output if All_Errors_Mode - or else Msg (Msg'Last) = '!' + or else Is_Unconditional_Msg or else Is_Warning_Msg or else OK_Node (N) or else (Msg (Msg'First) = '\' and then not Last_Killed) @@ -2711,7 +2710,6 @@ package body Errout is begin Manual_Quote_Mode := False; - Is_Unconditional_Msg := False; Msglen := 0; Flag_Source := Get_Source_File_Index (Flag); @@ -2776,7 +2774,7 @@ package body Errout is Set_Msg_Char ('"'); when '!' => - Is_Unconditional_Msg := True; + null; -- already dealt with when '?' => Set_Msg_Insertion_Warning; |