From c2e5400135b1da2b3a6afdfcad95aedfdaf364a0 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Mon, 20 Jan 2014 16:29:06 +0100 Subject: [multiple changes] 2014-01-20 Pascal Obry * s-win32.ads (FreeLibrary): New import. 2014-01-20 Robert Dewar * sem_res.adb, sem_cat.adb: Minor reformatting. * sem_ch11.adb (Analyze_Raise_Statement): Only give warning about assigning to OUT parameters for the current subprogram scope. * exp_ch4.adb: Minor reformatting. 2014-01-20 Ed Schonberg * exp_ch4.adb (Process_Transient_Object, Find_Enclosing_Contexts): If the top-level if-expression that generated the transient object is an actual in a call, the proper Hook_Context is a construct enclosing the call. * einfo.ads: Indicate that Related_Expression is used to link a loop variable to the container expression over which the loop takes place. (Analyze_Iterator_Specification): Set the Related_Expression of the loop variable in a container element iterator. (Note_Possible_Modification): If the variable is the loop variable in a container element iterator, indicate that the enclosing container is also modified. 2014-01-20 Hristian Kirtchev * aspects.adb (Move_Or_Merge_Aspects): Reimplemented. From-SVN: r206824 --- gcc/ada/sem_ch11.adb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gcc/ada/sem_ch11.adb') diff --git a/gcc/ada/sem_ch11.adb b/gcc/ada/sem_ch11.adb index a397edf..f0898bf 100644 --- a/gcc/ada/sem_ch11.adb +++ b/gcc/ada/sem_ch11.adb @@ -37,6 +37,7 @@ with Restrict; use Restrict; with Rident; use Rident; with Rtsfind; use Rtsfind; with Sem; use Sem; +with Sem_Aux; use Sem_Aux; with Sem_Ch5; use Sem_Ch5; with Sem_Ch8; use Sem_Ch8; with Sem_Ch13; use Sem_Ch13; @@ -533,6 +534,13 @@ package body Sem_Ch11 is if Is_Scalar_Type (Etype (L)) and then Is_Entity_Name (L) and then Is_Formal (Entity (L)) + + -- Do this only for parameters to the current subprogram. + -- This avoids some false positives for the nested case. + + and then Nearest_Dynamic_Scope (Current_Scope) = + Scope (Entity (L)) + then -- Don't give warning if we are covered by an exception -- handler, since this may result in false positives, since -- cgit v1.1