aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch11.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-01-20 16:29:06 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2014-01-20 16:29:06 +0100
commitc2e5400135b1da2b3a6afdfcad95aedfdaf364a0 (patch)
tree2f43273fc9c844875df4798c1e4fe8131b1453a2 /gcc/ada/sem_ch11.adb
parent90b51aaf6383fab0d308a3ae238a45d7a50933b4 (diff)
downloadgcc-c2e5400135b1da2b3a6afdfcad95aedfdaf364a0.zip
gcc-c2e5400135b1da2b3a6afdfcad95aedfdaf364a0.tar.gz
gcc-c2e5400135b1da2b3a6afdfcad95aedfdaf364a0.tar.bz2
[multiple changes]
2014-01-20 Pascal Obry <obry@adacore.com> * s-win32.ads (FreeLibrary): New import. 2014-01-20 Robert Dewar <dewar@adacore.com> * 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 <schonberg@adacore.com> * 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 <kirtchev@adacore.com> * aspects.adb (Move_Or_Merge_Aspects): Reimplemented. From-SVN: r206824
Diffstat (limited to 'gcc/ada/sem_ch11.adb')
-rw-r--r--gcc/ada/sem_ch11.adb8
1 files changed, 8 insertions, 0 deletions
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