Temp_Msg : Error_Msg_Id;
- Warn_Err : Boolean;
- -- Set if warning to be treated as error
-
First_Fix : Fix_Id := No_Fix;
Last_Fix : Fix_Id := No_Fix;
-- Test if warning to be treated as error
- Warn_Err :=
+ Errors.Table (Cur_Msg).Warn_Err :=
Error_Msg_Kind in Warning | Style
and then (Warning_Treated_As_Error (Msg_Buffer (1 .. Msglen))
or else Warning_Treated_As_Error (Get_Warning_Tag (Cur_Msg))
or else Is_Runtime_Raise);
- -- Propagate Warn_Err to this message and preceding continuations.
-
- for J in reverse 1 .. Errors.Last loop
- Errors.Table (J).Warn_Err := Warn_Err;
-
- exit when not Errors.Table (J).Msg_Cont;
- end loop;
-
-- If immediate errors mode set, output error message now. Also output
-- now if the -d1 debug flag is set (so node number message comes out
-- just before actual error message)
if not Errors.Table (E).Deleted then
Errors.Table (E).Deleted := True;
Warnings_Detected := Warnings_Detected - 1;
+
+ if Errors.Table (E).Warn_Err then
+ Warnings_Treated_As_Errors := Warnings_Treated_As_Errors - 1;
+ end if;
end if;
end Delete_Warning;
then
Warnings_Detected := Warnings_Detected - 1;
+ if Errors.Table (E).Warn_Err then
+ Warnings_Treated_As_Errors := Warnings_Treated_As_Errors - 1;
+ end if;
+
return True;
-- No removal required
when Warning | Style =>
Warnings_Detected := Warnings_Detected - 1;
+ if E.Warn_Err then
+ Warnings_Treated_As_Errors := Warnings_Treated_As_Errors - 1;
+ end if;
+
when High_Check | Medium_Check | Low_Check =>
Check_Messages := Check_Messages - 1;
when Warning | Style =>
Warnings_Detected := Warnings_Detected + 1;
+ if E.Warn_Err then
+ Warnings_Treated_As_Errors := Warnings_Treated_As_Errors + 1;
+
+ -- Propagate Warn_Err to all of the preceeding continuation
+ -- messages and the main message.
+
+ for J in reverse 1 .. Errors.Last loop
+ if not Errors.Table (J).Warn_Err then
+ Errors.Table (J).Warn_Err := E.Warn_Err;
+
+ Warnings_Treated_As_Errors :=
+ Warnings_Treated_As_Errors + 1;
+ end if;
+
+ exit when not Errors.Table (J).Msg_Cont;
+ end loop;
+ end if;
+
when High_Check | Medium_Check | Low_Check =>
Check_Messages := Check_Messages + 1;
-- Additionally include the style suffix when needed.
if E_Msg.Warn_Err then
-
- Warnings_Treated_As_Errors := Warnings_Treated_As_Errors + 1;
-
Append
(Buf,
SGR_Error & "error: " & SGR_Reset &