Commit 2b881d53 by Robert Dewar Committed by Geert Bosch

* sem_util.adb

        (Defining_Entity): Deal with Error.
	(Process_End_Label): Deal with bad end label for.

From-SVN: r46514
parent 578053f2
2001-10-25 Robert Dewar <dewar@gnat.com>
* sem_util.adb
(Defining_Entity): Deal with Error.
(Process_End_Label): Deal with bad end label for.
2001-10-25 Ed Schonberg <schonber@gnat.com>
* sem_elab.adb (Check_A_Call): refine message when call is in an
......
......@@ -1177,6 +1177,16 @@ package body Sem_Util is
begin
if Nkind (Nam) in N_Entity then
return Nam;
-- For Error, make up a name so we can continue
elsif Nam = Error then
return
Make_Defining_Identifier (Sloc (N),
Chars => New_Internal_Name ('T'));
-- If not an entity, get defining identifier
else
return Defining_Identifier (Nam);
end if;
......@@ -4270,10 +4280,12 @@ package body Sem_Util is
-- Nothing to do if no End_Label, happens for internally generated
-- constructs where we don't want an end label reference anyway.
-- Also nothing to do if Endl is a string literal, which means
-- there was some prior error (bad operator symbol)
Endl := End_Label (N);
if No (Endl) then
if No (Endl) or else Nkind (Endl) = N_String_Literal then
return;
end if;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment