Commit c19d1615 by Ed Schonberg Committed by Arnaud Charlet

sem_ch10.adb (Analyze_Subunit_Context): When analyzing context clauses of subunits...

2007-08-31  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch10.adb (Analyze_Subunit_Context): When analyzing context
	clauses of subunits, ignore limited_with_clauses that are illegal and
	have not been fully analyzed.

From-SVN: r127979
parent 1d7d0be6
...@@ -1892,6 +1892,10 @@ package body Sem_Ch10 is ...@@ -1892,6 +1892,10 @@ package body Sem_Ch10 is
-- Protect frontend against previous errors in context clauses -- Protect frontend against previous errors in context clauses
if Nkind (Name (Item)) /= N_Selected_Component then if Nkind (Name (Item)) /= N_Selected_Component then
if Error_Posted (Item) then
null;
else
Unit_Name := Entity (Name (Item)); Unit_Name := Entity (Name (Item));
while Is_Child_Unit (Unit_Name) loop while Is_Child_Unit (Unit_Name) loop
Set_Is_Visible_Child_Unit (Unit_Name); Set_Is_Visible_Child_Unit (Unit_Name);
...@@ -1903,6 +1907,7 @@ package body Sem_Ch10 is ...@@ -1903,6 +1907,7 @@ package body Sem_Ch10 is
Set_Context_Installed (Item); Set_Context_Installed (Item);
end if; end if;
end if; end if;
end if;
elsif Nkind (Item) = N_Use_Package_Clause then elsif Nkind (Item) = N_Use_Package_Clause then
Nam := First (Names (Item)); Nam := First (Names (Item));
...@@ -1932,6 +1937,7 @@ package body Sem_Ch10 is ...@@ -1932,6 +1937,7 @@ package body Sem_Ch10 is
-- Protect frontend against previous errors in context clauses -- Protect frontend against previous errors in context clauses
and then Nkind (Name (Item)) /= N_Selected_Component and then Nkind (Name (Item)) /= N_Selected_Component
and then not Error_Posted (Item)
then then
Unit_Name := Entity (Name (Item)); Unit_Name := Entity (Name (Item));
while Is_Child_Unit (Unit_Name) loop while Is_Child_Unit (Unit_Name) loop
......
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