From 1c85591cabcde20a01a2ecb90d857625a5681ae4 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Wed, 7 Jan 2015 11:12:03 +0100 Subject: [multiple changes] 2015-01-07 Robert Dewar * a-reatim.adb, make.adb, exp_pakd.adb, i-cpoint.adb, sem_ch8.adb, exp_ch3.adb: Minor reformatting. 2015-01-07 Doug Rupp * s-linux.ads (clockid_t): New subtype. * s-osinte-linux.ads (pragma Linker Options): Add -lrt. (clockid_t): New subtype. (clock_getres): Import system call. * s-taprop-linux.adb (System.OS_Constants): With and rename. (RT_Resolution): Remove hardcoded value and call clock_getres. * s-linux-sparc.ads, s-linux-mipsel.ads, s-linux-hppa.ads, s-linux-alpha.ads, s-linux-x32.ads (clockid_t): Add new subtype. 2015-01-07 Robert Dewar * sem_warn.adb (Check_One_Unit): Guard against context item with no Entity field. From-SVN: r219289 --- gcc/ada/sem_warn.adb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gcc/ada/sem_warn.adb') diff --git a/gcc/ada/sem_warn.adb b/gcc/ada/sem_warn.adb index 7bdda64..4845096 100644 --- a/gcc/ada/sem_warn.adb +++ b/gcc/ada/sem_warn.adb @@ -2350,6 +2350,13 @@ package body Sem_Warn is if Nkind (Item) = N_With_Clause and then not Implicit_With (Item) and then In_Extended_Main_Source_Unit (Item) + + -- Guard for no entity present. Not clear under what conditions + -- this happens, but it does occur, and since this is only a + -- warning, we just suppress the warning in this case. + + and then Nkind (Name (Item)) in N_Has_Entity + and then Present (Entity (Name (Item))) then Lunit := Entity (Name (Item)); -- cgit v1.1