procedure Error_Msg_Internal
(Msg : String;
- Sptr : Source_Ptr;
- Optr : Source_Ptr;
+ Span : Source_Span;
+ Opan : Source_Span;
Msg_Cont : Boolean;
Node : Node_Id);
-- This is the low level routine used to post messages after dealing with
Err_Id : Error_Msg_Id := Error_Id;
begin
- Set_Msg_Text (New_Msg, Errors.Table (Error_Id).Sptr);
+ Set_Msg_Text (New_Msg, Errors.Table (Error_Id).Sptr.Ptr);
Errors.Table (Error_Id).Text := new String'(Msg_Buffer (1 .. Msglen));
-- If in immediate error message mode, output modified error message now
---------------
-- Error_Msg posts a flag at the given location, except that if the
- -- Flag_Location points within a generic template and corresponds to an
- -- instantiation of this generic template, then the actual message will be
- -- posted on the generic instantiation, along with additional messages
- -- referencing the generic declaration.
+ -- Flag_Location/Flag_Span points within a generic template and corresponds
+ -- to an instantiation of this generic template, then the actual message
+ -- will be posted on the generic instantiation, along with additional
+ -- messages referencing the generic declaration.
procedure Error_Msg (Msg : String; Flag_Location : Source_Ptr) is
begin
- Error_Msg (Msg, Flag_Location, Current_Node);
+ Error_Msg (Msg, To_Span (Flag_Location), Current_Node);
+ end Error_Msg;
+
+ procedure Error_Msg (Msg : String; Flag_Span : Source_Span) is
+ begin
+ Error_Msg (Msg, Flag_Span, Current_Node);
end Error_Msg;
procedure Error_Msg
Save_Is_Compile_Time_Msg : constant Boolean := Is_Compile_Time_Msg;
begin
Is_Compile_Time_Msg := Is_Compile_Time_Pragma;
- Error_Msg (Msg, Flag_Location, Current_Node);
+ Error_Msg (Msg, To_Span (Flag_Location), Current_Node);
Is_Compile_Time_Msg := Save_Is_Compile_Time_Msg;
end Error_Msg;
Flag_Location : Source_Ptr;
N : Node_Id)
is
+ begin
+ Error_Msg (Msg, To_Span (Flag_Location), N);
+ end Error_Msg;
+
+ procedure Error_Msg
+ (Msg : String;
+ Flag_Span : Source_Span;
+ N : Node_Id)
+ is
+ Flag_Location : constant Source_Ptr := Flag_Span.Ptr;
+
Sindex : Source_File_Index;
-- Source index for flag location
-- Error_Msg_Internal to place the message in the requested location.
if Instantiation (Sindex) = No_Location then
- Error_Msg_Internal (Msg, Flag_Location, Flag_Location, False, N);
+ Error_Msg_Internal (Msg, Flag_Span, Flag_Span, False, N);
return;
end if;
if Is_Info_Msg then
Error_Msg_Internal
(Msg => "info: in inlined body #",
- Sptr => Actual_Error_Loc,
- Optr => Flag_Location,
+ Span => To_Span (Actual_Error_Loc),
+ Opan => Flag_Span,
Msg_Cont => Msg_Cont_Status,
Node => N);
elsif Is_Warning_Msg then
Error_Msg_Internal
(Msg => Warn_Insertion & "in inlined body #",
- Sptr => Actual_Error_Loc,
- Optr => Flag_Location,
+ Span => To_Span (Actual_Error_Loc),
+ Opan => Flag_Span,
Msg_Cont => Msg_Cont_Status,
Node => N);
elsif Is_Style_Msg then
Error_Msg_Internal
(Msg => "style: in inlined body #",
- Sptr => Actual_Error_Loc,
- Optr => Flag_Location,
+ Span => To_Span (Actual_Error_Loc),
+ Opan => Flag_Span,
Msg_Cont => Msg_Cont_Status,
Node => N);
else
Error_Msg_Internal
(Msg => "error in inlined body #",
- Sptr => Actual_Error_Loc,
- Optr => Flag_Location,
+ Span => To_Span (Actual_Error_Loc),
+ Opan => Flag_Span,
Msg_Cont => Msg_Cont_Status,
Node => N);
end if;
if Is_Info_Msg then
Error_Msg_Internal
(Msg => "info: in instantiation #",
- Sptr => Actual_Error_Loc,
- Optr => Flag_Location,
+ Span => To_Span (Actual_Error_Loc),
+ Opan => Flag_Span,
Msg_Cont => Msg_Cont_Status,
Node => N);
elsif Is_Warning_Msg then
Error_Msg_Internal
(Msg => Warn_Insertion & "in instantiation #",
- Sptr => Actual_Error_Loc,
- Optr => Flag_Location,
+ Span => To_Span (Actual_Error_Loc),
+ Opan => Flag_Span,
Msg_Cont => Msg_Cont_Status,
Node => N);
elsif Is_Style_Msg then
Error_Msg_Internal
(Msg => "style: in instantiation #",
- Sptr => Actual_Error_Loc,
- Optr => Flag_Location,
+ Span => To_Span (Actual_Error_Loc),
+ Opan => Flag_Span,
Msg_Cont => Msg_Cont_Status,
Node => N);
else
Error_Msg_Internal
(Msg => "instantiation error #",
- Sptr => Actual_Error_Loc,
- Optr => Flag_Location,
+ Span => To_Span (Actual_Error_Loc),
+ Opan => Flag_Span,
Msg_Cont => Msg_Cont_Status,
Node => N);
end if;
Error_Msg_Internal
(Msg => Msg,
- Sptr => Actual_Error_Loc,
- Optr => Flag_Location,
+ Span => To_Span (Actual_Error_Loc),
+ Opan => Flag_Span,
Msg_Cont => Msg_Cont_Status,
Node => N);
end;
-----------------
procedure Error_Msg_F (Msg : String; N : Node_Id) is
+ Fst, Lst : Node_Id;
begin
- Error_Msg_NEL (Msg, N, N, Sloc (First_Node (N)));
+ First_And_Last_Nodes (N, Fst, Lst);
+ Error_Msg_NEL (Msg, N, N,
+ To_Span (Ptr => Sloc (Fst),
+ First => First_Sloc (Fst),
+ Last => Last_Sloc (Lst)));
end Error_Msg_F;
------------------
N : Node_Id;
E : Node_Or_Entity_Id)
is
+ Fst, Lst : Node_Id;
begin
- Error_Msg_NEL (Msg, N, E, Sloc (First_Node (N)));
+ First_And_Last_Nodes (N, Fst, Lst);
+ Error_Msg_NEL (Msg, N, E,
+ To_Span (Ptr => Sloc (Fst),
+ First => First_Sloc (Fst),
+ Last => Last_Sloc (Lst)));
end Error_Msg_FE;
------------------------
procedure Error_Msg_Internal
(Msg : String;
- Sptr : Source_Ptr;
- Optr : Source_Ptr;
+ Span : Source_Span;
+ Opan : Source_Span;
Msg_Cont : Boolean;
Node : Node_Id)
is
+ Sptr : constant Source_Ptr := Span.Ptr;
+ Optr : constant Source_Ptr := Opan.Ptr;
+
Next_Msg : Error_Msg_Id;
-- Pointer to next message at insertion point
((Text => new String'(Msg_Buffer (1 .. Msglen)),
Next => No_Error_Msg,
Prev => No_Error_Msg,
- Sptr => Sptr,
+ Sptr => Span,
Optr => Optr,
Insertion_Sloc => (if Has_Insertion_Line then Error_Msg_Sloc
else No_Location),
if Last_Error_Msg /= No_Error_Msg
and then Errors.Table (Cur_Msg).Sfile =
Errors.Table (Last_Error_Msg).Sfile
- and then (Sptr > Errors.Table (Last_Error_Msg).Sptr
+ and then (Sptr > Errors.Table (Last_Error_Msg).Sptr.Ptr
or else
- (Sptr = Errors.Table (Last_Error_Msg).Sptr
+ (Sptr = Errors.Table (Last_Error_Msg).Sptr.Ptr
and then
Optr > Errors.Table (Last_Error_Msg).Optr))
then
if Errors.Table (Cur_Msg).Sfile = Errors.Table (Next_Msg).Sfile
then
- exit when Sptr < Errors.Table (Next_Msg).Sptr
- or else (Sptr = Errors.Table (Next_Msg).Sptr
+ exit when Sptr < Errors.Table (Next_Msg).Sptr.Ptr
+ or else (Sptr = Errors.Table (Next_Msg).Sptr.Ptr
and then Optr < Errors.Table (Next_Msg).Optr);
end if;
-----------------
procedure Error_Msg_N (Msg : String; N : Node_Or_Entity_Id) is
+ Fst, Lst : Node_Id;
begin
- Error_Msg_NEL (Msg, N, N, Sloc (N));
+ First_And_Last_Nodes (N, Fst, Lst);
+ Error_Msg_NEL (Msg, N, N,
+ To_Span (Ptr => Sloc (N),
+ First => First_Sloc (Fst),
+ Last => Last_Sloc (Lst)));
end Error_Msg_N;
------------------
N : Node_Or_Entity_Id;
E : Node_Or_Entity_Id)
is
+ Fst, Lst : Node_Id;
begin
- Error_Msg_NEL (Msg, N, E, Sloc (N));
+ First_And_Last_Nodes (N, Fst, Lst);
+ Error_Msg_NEL (Msg, N, E,
+ To_Span (Ptr => Sloc (N),
+ First => First_Sloc (Fst),
+ Last => Last_Sloc (Lst)));
end Error_Msg_NE;
-------------------
E : Node_Or_Entity_Id;
Flag_Location : Source_Ptr)
is
+ begin
+ Error_Msg_NEL (Msg, N, E, To_Span (Flag_Location));
+ end Error_Msg_NEL;
+
+ procedure Error_Msg_NEL
+ (Msg : String;
+ N : Node_Or_Entity_Id;
+ E : Node_Or_Entity_Id;
+ Flag_Span : Source_Span)
+ is
begin
if Special_Msg_Delete (Msg, N, E) then
return;
then
Debug_Output (N);
Error_Msg_Node_1 := E;
- Error_Msg (Msg, Flag_Location, N);
+ Error_Msg (Msg, Flag_Span, N);
else
Last_Killed := True;
Msg : String;
N : Node_Or_Entity_Id)
is
+ Fst, Lst : Node_Id;
begin
if Eflag
and then In_Extended_Main_Source_Unit (N)
and then Comes_From_Source (N)
then
- Error_Msg_NEL (Msg, N, N, Sloc (N));
+ First_And_Last_Nodes (N, Fst, Lst);
+ Error_Msg_NEL (Msg, N, N,
+ To_Span (Ptr => Sloc (N),
+ First => First_Sloc (Fst),
+ Last => Last_Sloc (Lst)));
end if;
end Error_Msg_NW;
F := Nxt;
while F /= No_Error_Msg
- and then Errors.Table (F).Sptr = Errors.Table (Cur).Sptr
+ and then Errors.Table (F).Sptr.Ptr = Errors.Table (Cur).Sptr.Ptr
loop
Check_Duplicate_Message (Cur, F);
F := Errors.Table (F).Next;
begin
if (CE.Warn and not CE.Deleted)
and then
- (Warning_Specifically_Suppressed (CE.Sptr, CE.Text, Tag) /=
- No_String
+ (Warning_Specifically_Suppressed (CE.Sptr.Ptr, CE.Text, Tag)
+ /= No_String
or else
Warning_Specifically_Suppressed (CE.Optr, CE.Text, Tag) /=
No_String)
----------------
function First_Node (C : Node_Id) return Node_Id is
+ Fst, Lst : Node_Id;
+ begin
+ First_And_Last_Nodes (C, Fst, Lst);
+ return Fst;
+ end First_Node;
+
+ --------------------------
+ -- First_And_Last_Nodes --
+ --------------------------
+
+ procedure First_And_Last_Nodes
+ (C : Node_Id;
+ First_Node, Last_Node : out Node_Id)
+ is
Orig : constant Node_Id := Original_Node (C);
Loc : constant Source_Ptr := Sloc (Orig);
Sfile : constant Source_File_Index := Get_Source_File_Index (Loc);
Earliest : Node_Id;
+ Latest : Node_Id;
Eloc : Source_Ptr;
+ Lloc : Source_Ptr;
- function Test_Earlier (N : Node_Id) return Traverse_Result;
+ function Test_First_And_Last (N : Node_Id) return Traverse_Result;
-- Function applied to every node in the construct
- procedure Search_Tree_First is new Traverse_Proc (Test_Earlier);
+ procedure Search_Tree_First_And_Last is new
+ Traverse_Proc (Test_First_And_Last);
-- Create traversal procedure
- ------------------
- -- Test_Earlier --
- ------------------
+ -------------------------
+ -- Test_First_And_Last --
+ -------------------------
- function Test_Earlier (N : Node_Id) return Traverse_Result is
+ function Test_First_And_Last (N : Node_Id) return Traverse_Result is
Norig : constant Node_Id := Original_Node (N);
Loc : constant Source_Ptr := Sloc (Norig);
Eloc := Loc;
end if;
+ -- Check for later
+
+ if Loc > Lloc
+
+ -- Ignore nodes with no useful location information
+
+ and then Loc /= Standard_Location
+ and then Loc /= No_Location
+
+ -- Ignore nodes from a different file. This ensures against cases
+ -- of strange foreign code somehow being present. We don't want
+ -- wild placement of messages if that happens.
+
+ and then Get_Source_File_Index (Loc) = Sfile
+ then
+ Latest := Norig;
+ Lloc := Loc;
+ end if;
+
return OK_Orig;
- end Test_Earlier;
+ end Test_First_And_Last;
- -- Start of processing for First_Node
+ -- Start of processing for First_And_Last_Nodes
begin
- if Nkind (Orig) in N_Subexpr then
+ if Nkind (Orig) in N_Subexpr
+ | N_Declaration
+ | N_Access_To_Subprogram_Definition
+ | N_Generic_Instantiation
+ | N_Subprogram_Declaration
+ | N_Use_Package_Clause
+ | N_Array_Type_Definition
+ | N_Renaming_Declaration
+ | N_Generic_Renaming_Declaration
+ | N_Assignment_Statement
+ | N_Raise_Statement
+ | N_Simple_Return_Statement
+ | N_Exit_Statement
+ | N_Pragma
+ | N_Use_Type_Clause
+ | N_With_Clause
+ then
Earliest := Orig;
Eloc := Loc;
- Search_Tree_First (Orig);
- return Earliest;
+ Latest := Orig;
+ Lloc := Loc;
+ Search_Tree_First_And_Last (Orig);
+ First_Node := Earliest;
+ Last_Node := Latest;
else
- return Orig;
+ First_Node := Orig;
+ Last_Node := Orig;
end if;
- end First_Node;
+ end First_And_Last_Nodes;
----------------
-- First_Sloc --
function First_Sloc (N : Node_Id) return Source_Ptr is
SI : constant Source_File_Index := Source_Index (Get_Source_Unit (N));
SF : constant Source_Ptr := Source_First (SI);
+ SL : constant Source_Ptr := Source_Last (SI);
F : Node_Id;
S : Source_Ptr;
F := First_Node (N);
S := Sloc (F);
+ -- ??? Protect against inconsistency in locations, by returning S
+ -- immediately if not in the expected range, rather than failing with
+ -- a Constraint_Error when accessing Source_Text(SI)(S)
+
+ if S not in SF .. SL then
+ return S;
+ end if;
+
-- The following circuit is a bit subtle. When we have parenthesized
-- expressions, then the Sloc will not record the location of the paren,
-- but we would like to post the flag on the paren. So what we do is to
-- True if S starts with Size_For
end Is_Size_Too_Small_Message;
+ ---------------
+ -- Last_Node --
+ ---------------
+
+ function Last_Node (C : Node_Id) return Node_Id is
+ Fst, Lst : Node_Id;
+ begin
+ First_And_Last_Nodes (C, Fst, Lst);
+ return Lst;
+ end Last_Node;
+
+ ---------------
+ -- Last_Sloc --
+ ---------------
+
+ function Last_Sloc (N : Node_Id) return Source_Ptr is
+ SI : constant Source_File_Index := Source_Index (Get_Source_Unit (N));
+ SF : constant Source_Ptr := Source_First (SI);
+ SL : constant Source_Ptr := Source_Last (SI);
+ F : Node_Id;
+ S : Source_Ptr;
+
+ begin
+ F := Last_Node (N);
+ S := Sloc (F);
+
+ -- ??? Protect against inconsistency in locations, by returning S
+ -- immediately if not in the expected range, rather than failing with
+ -- a Constraint_Error when accessing Source_Text(SI)(S)
+
+ if S not in SF .. SL then
+ return S;
+ end if;
+
+ -- Skip past an identifier
+
+ while S in SF .. SL - 1
+ and then Source_Text (SI) (S + 1)
+ in
+ '0' .. '9' | 'a' .. 'z' | 'A' .. 'Z' | '.' | '_'
+ loop
+ S := S + 1;
+ end loop;
+
+ -- The following circuit attempts at crawling up the tree from the
+ -- Last_Node, adjusting the Sloc value for any parentheses we know
+ -- are present, similarly to what is done in First_Sloc.
+
+ Node_Loop : loop
+ Paren_Loop : for J in 1 .. Paren_Count (F) loop
+
+ -- We don't look more than 12 characters after the current
+ -- location
+
+ Search_Loop : for K in 1 .. 12 loop
+ exit Node_Loop when S = SL;
+
+ if Source_Text (SI) (S + 1) = ')' then
+ S := S + 1;
+ exit Search_Loop;
+
+ elsif Source_Text (SI) (S + 1) <= ' ' then
+ S := S + 1;
+
+ else
+ exit Search_Loop;
+ end if;
+ end loop Search_Loop;
+ end loop Paren_Loop;
+
+ exit Node_Loop when F = N;
+ F := Parent (F);
+ exit Node_Loop when Nkind (F) not in N_Subexpr;
+ end loop Node_Loop;
+
+ -- Remove any trailing space
+
+ while S in SF + 1 .. SL
+ and then Source_Text (SI) (S) = ' '
+ loop
+ S := S - 1;
+ end loop;
+
+ return S;
+ end Last_Sloc;
+
-----------------
-- No_Warnings --
-----------------
procedure Write_Max_Errors;
-- Write message if max errors reached
- procedure Write_Source_Code_Line (Loc : Source_Ptr);
- -- Write the source code line corresponding to Loc, as follows:
+ procedure Write_Source_Code_Lines (Span : Source_Span);
+ -- Write the source code line corresponding to Span, as follows when
+ -- Span in on one line:
+ --
+ -- line | actual code line here with Span somewhere
+ -- | ~~~~~^~~~
+ --
+ -- where the caret on the line points to location Span.Ptr, and the
+ -- range Span.First..Span.Last is underlined.
+ --
+ -- or when the span is over multiple lines:
+ --
+ -- line | beginning of the Span on this line
+ -- ... | ...
+ -- line>| actual code line here with Span.Ptr somewhere
+ -- ... | ...
+ -- line | end of the Span on this line
+ --
+ -- or when the span is a simple location, as follows:
--
- -- line | actual code line here with Loc somewhere
+ -- line | actual code line here with Span somewhere
-- | ^ here
--
- -- where the carret on the last line points to location Loc.
+ -- where the caret on the line points to location Span.Ptr
-------------------------
-- Write_Error_Summary --
end if;
end Write_Max_Errors;
- ----------------------------
- -- Write_Source_Code_Line --
- ----------------------------
+ -----------------------------
+ -- Write_Source_Code_Lines --
+ -----------------------------
- procedure Write_Source_Code_Line (Loc : Source_Ptr) is
+ procedure Write_Source_Code_Lines (Span : Source_Span) is
function Image (X : Positive; Width : Positive) return String;
-- Output number X over Width characters, with whitespace padding.
-- Only output the low-order Width digits of X, if X is larger than
-- Width digits.
+ procedure Write_Line_Marker
+ (Num : Pos;
+ Mark : Boolean;
+ Width : Positive);
+ -- Output the line number Num over Width characters, with possibly
+ -- a Mark to denote the line with the main location when reporting
+ -- a span over multiple lines.
+
-----------
-- Image --
-----------
return Str;
end Image;
+ -----------------------
+ -- Write_Line_Marker --
+ -----------------------
+
+ procedure Write_Line_Marker
+ (Num : Pos;
+ Mark : Boolean;
+ Width : Positive)
+ is
+ begin
+ Write_Str (Image (Positive (Num), Width => Width));
+ Write_Str ((if Mark then ">" else " ") & "|");
+ end Write_Line_Marker;
+
-- Local variables
- Line : constant Pos := Pos (Get_Physical_Line_Number (Loc));
- Col : constant Natural := Natural (Get_Column_Number (Loc));
- Width : constant := 5;
+ Loc : constant Source_Ptr := Span.Ptr;
+ Line : constant Pos := Pos (Get_Physical_Line_Number (Loc));
- Buf : Source_Buffer_Ptr;
- Cur_Loc : Source_Ptr := Loc;
+ Col : constant Natural := Natural (Get_Column_Number (Loc));
- -- Start of processing for Write_Source_Code_Line
+ Fst : constant Source_Ptr := Span.First;
+ Line_Fst : constant Pos :=
+ Pos (Get_Physical_Line_Number (Fst));
+ Col_Fst : constant Natural :=
+ Natural (Get_Column_Number (Fst));
+ Lst : constant Source_Ptr := Span.Last;
+ Line_Lst : constant Pos :=
+ Pos (Get_Physical_Line_Number (Lst));
+ Col_Lst : constant Natural :=
+ Natural (Get_Column_Number (Lst));
+
+ Width : constant := 5;
+ Buf : Source_Buffer_Ptr;
+ Cur_Loc : Source_Ptr := Fst;
+ Cur_Line : Pos := Line_Fst;
+
+ -- Start of processing for Write_Source_Code_Lines
begin
if Loc >= First_Source_Ptr then
Buf := Source_Text (Get_Source_File_Index (Loc));
- -- First line with the actual source code line
+ -- First line of the span with actual source code
- Write_Str (Image (Positive (Line), Width => Width));
- Write_Str (" |");
- Write_Str (String (Buf (Loc - Source_Ptr (Col) + 1 .. Loc - 1)));
+ Write_Line_Marker
+ (Cur_Line,
+ Line_Fst /= Line_Lst and then Cur_Line = Line,
+ Width);
+ Write_Str
+ (String (Buf (Fst - Source_Ptr (Col_Fst) + 1 .. Fst - 1)));
+
+ -- Output all the lines in the span
+
+ while Cur_Loc <= Buf'Last
+ and then Cur_Loc < Lst
+ loop
+ Write_Char (Buf (Cur_Loc));
+ Cur_Loc := Cur_Loc + 1;
+
+ if Buf (Cur_Loc - 1) = ASCII.LF then
+ Cur_Line := Cur_Line + 1;
+ Write_Line_Marker
+ (Cur_Line,
+ Line_Fst /= Line_Lst and then Cur_Line = Line,
+ Width);
+ end if;
+ end loop;
+
+ -- Output the rest of the last line of the span
while Cur_Loc <= Buf'Last
and then Buf (Cur_Loc) /= ASCII.LF
Write_Eol;
- -- Second line with carret sign pointing to location Loc
+ -- If the span is on one line, output a second line with caret
+ -- sign pointing to location Loc
- Write_Str (String'(1 .. Width => ' '));
- Write_Str (" |");
- Write_Str (String'(1 .. Col - 1 => ' '));
- Write_Str ("^ here");
- Write_Eol;
+ if Line_Fst = Line_Lst then
+ Write_Str (String'(1 .. Width => ' '));
+ Write_Str (" |");
+ Write_Str (String'(1 .. Col_Fst - 1 => ' '));
+ Write_Str (String'(Col_Fst .. Col - 1 => '~'));
+ Write_Str ("^");
+ Write_Str (String'(Col + 1 .. Col_Lst => '~'));
+
+ -- If the span is really just a location, add the word "here"
+ -- to clarify this is the location for the message.
+
+ if Col_Fst = Col_Lst then
+ Write_Str (" here");
+ end if;
+
+ Write_Eol;
+ end if;
end if;
- end Write_Source_Code_Line;
+ end Write_Source_Code_Lines;
-- Local variables
Errors.Table (E).Insertion_Sloc;
begin
if Loc /= No_Location then
- Write_Source_Code_Line (Loc);
+ Write_Source_Code_Lines (To_Span (Loc));
end if;
end;
else
- Write_Source_Code_Line (Errors.Table (E).Sptr);
+ Write_Source_Code_Lines (Errors.Table (E).Sptr);
end if;
end if;
end if;
-- subunits for a body).
while E /= No_Error_Msg
- and then (not In_Extended_Main_Source_Unit (Errors.Table (E).Sptr)
+ and then (not In_Extended_Main_Source_Unit
+ (Errors.Table (E).Sptr.Ptr)
or else
(Debug_Flag_Dot_M
and then Get_Source_Unit
- (Errors.Table (E).Sptr) /= Main_Unit))
+ (Errors.Table (E).Sptr.Ptr) /= Main_Unit))
loop
if Errors.Table (E).Deleted then
E := Errors.Table (E).Next;