Commit 1cc40a10 by Robert Dewar Committed by Arnaud Charlet

sem_warn.adb (Check_References): Catch more cases of unreferenced packages.

2007-09-26  Robert Dewar  <dewar@adacore.com>

	* sem_warn.adb (Check_References): Catch more cases of unreferenced
	packages.

From-SVN: r128805
parent e65f50ec
......@@ -1140,14 +1140,21 @@ package body Sem_Warn is
Ekind (E1) = E_Named_Real
or else
Is_Overloadable (E1)
-- Package case, if the main unit is a package
-- spec or generic package spec, then there may
-- be a corresponding body that references this
-- package in some other file. Otherwise we can
-- be sure that there is no other reference.
or else
(Ekind (E1) = E_Package
and then
(Ekind (E) = E_Function
or else Ekind (E) = E_Package_Body
or else Ekind (E) = E_Procedure
or else Ekind (E) = E_Subprogram_Body
or else Ekind (E) = E_Block)))
and then
Ekind (Cunit_Entity (Current_Sem_Unit)) /=
E_Package
and then
Ekind (Cunit_Entity (Current_Sem_Unit)) /=
E_Generic_Package))
-- Exclude instantiations, since there is no reason why every
-- entity in an instantiation should be referenced.
......
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