Id := Msg;
loop
- declare
- M : Error_Msg_Object renames Errors.Table (Id);
-
- begin
- if not M.Deleted then
- M.Deleted := True;
- Decrease_Error_Msg_Count (M);
- end if;
+ Delete_Error_Msg (Id);
- Id := M.Next;
- exit when Id = No_Error_Msg;
- exit when not Errors.Table (Id).Msg_Cont;
- end;
+ Id := Errors.Table (Id).Next;
+ exit when Id = No_Error_Msg;
+ exit when not Errors.Table (Id).Msg_Cont;
end loop;
end Delete_Warning_And_Continuations;
Nxt : Error_Msg_Id;
F : Error_Msg_Id;
- procedure Delete_Warning (E : Error_Msg_Id);
- -- Delete a warning msg if not already deleted and adjust warning count
-
- --------------------
- -- Delete_Warning --
- --------------------
-
- procedure Delete_Warning (E : Error_Msg_Id) is
- begin
- if not Errors.Table (E).Deleted then
- Errors.Table (E).Deleted := True;
- Decrease_Error_Msg_Count (Errors.Table (E));
- end if;
- end Delete_Warning;
-
-- Start of processing for Finalize
begin
Warning_Specifically_Suppressed (CE.Optr.Ptr, CE.Text, Tag)
/= No_String)
then
- Delete_Warning (Cur);
+ Delete_Error_Msg (Cur);
-- If this is a continuation, delete previous parts of message
while Errors.Table (F).Msg_Cont loop
F := Errors.Table (F).Prev;
exit when F = No_Error_Msg;
- Delete_Warning (F);
+ Delete_Error_Msg (F);
end loop;
-- Delete any following continuations
F := Errors.Table (F).Next;
exit when F = No_Error_Msg;
exit when not Errors.Table (F).Msg_Cont;
- Delete_Warning (F);
+ Delete_Error_Msg (F);
end loop;
end if;
end;
and then not Errors.Table (E).Uncond
then
- Decrease_Error_Msg_Count (Errors.Table (E));
-
return True;
-- No removal required
-- Start of processing for Check_For_Warnings
begin
+ -- Remove the first messages from the error chain.
+ -- ??? Why not delete them like the others?
+
while To_Be_Removed (First_Error_Msg) loop
+ Decrease_Error_Msg_Count (Errors.Table (First_Error_Msg));
First_Error_Msg := Errors.Table (First_Error_Msg).Next;
end loop;
E := First_Error_Msg;
while E /= No_Error_Msg loop
while To_Be_Removed (Errors.Table (E).Next) loop
- Errors.Table (Errors.Table (E).Next).Deleted := True;
+ Delete_Error_Msg (Errors.Table (E).Next);
Errors.Table (E).Next :=
Errors.Table (Errors.Table (E).Next).Next;
K := Keep;
loop
- Errors.Table (D).Deleted := True;
-
- Decrease_Error_Msg_Count (Errors.Table (D));
+ Delete_Error_Msg (D);
-- Substitute shorter of the two error messages
end if;
end Debug_Output;
+ ----------------------
+ -- Delete_Error_Msg --
+ ----------------------
+
+ procedure Delete_Error_Msg (E : Error_Msg_Id) is
+ begin
+ if not Errors.Table (E).Deleted then
+ Errors.Table (E).Deleted := True;
+ Decrease_Error_Msg_Count (Errors.Table (E));
+ end if;
+ end Delete_Error_Msg;
+
-----------
-- dedit --
-----------
and then Errors.Table (E).Sptr.Ptr > From
and then Errors.Table (E).Sptr.Ptr < To
then
- Decrease_Error_Msg_Count (Errors.Table (E));
-
return True;
else
-- Start of processing for Purge_Messages
begin
+ -- Remove the first messages from the error chain.
+ -- ??? Why not delete them like the others?
+
while To_Be_Purged (First_Error_Msg) loop
+ Decrease_Error_Msg_Count (Errors.Table (First_Error_Msg));
First_Error_Msg := Errors.Table (First_Error_Msg).Next;
end loop;
E := First_Error_Msg;
while E /= No_Error_Msg loop
while To_Be_Purged (Errors.Table (E).Next) loop
- Errors.Table (Errors.Table (E).Next).Deleted := True;
+ Delete_Error_Msg (Errors.Table (E).Next);
Errors.Table (E).Next :=
Errors.Table (Errors.Table (E).Next).Next;
-- Tag used at the end of warning messages that were converted by
-- pragma Warning_As_Error.
+ procedure Delete_Error_Msg (E : Error_Msg_Id);
+ -- Delete an error msg if not already deleted and adjust message count
+
procedure Purge_Messages (From : Source_Ptr; To : Source_Ptr);
-- All error messages whose location is in the range From .. To (not
-- including the end points) will be deleted from the error listing.