aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/lib-xref.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2011-09-06 13:03:44 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2011-09-06 13:03:44 +0200
commitf8e9fc30f7f06af84310ecb982ee8600f62610fb (patch)
tree2d2f91b3a0cd4aed6e03e988e2bd29d877adfeb2 /gcc/ada/lib-xref.adb
parente8e38f35ff31141dd99c9fe036c226c096a30739 (diff)
downloadgcc-f8e9fc30f7f06af84310ecb982ee8600f62610fb.zip
gcc-f8e9fc30f7f06af84310ecb982ee8600f62610fb.tar.gz
gcc-f8e9fc30f7f06af84310ecb982ee8600f62610fb.tar.bz2
[multiple changes]
2011-09-06 Ed Schonberg <schonberg@adacore.com> * lib-xref.adb (OK_To_Set_Referenced): A reference to a formal in a parameter association must not set the Referenced flag on the formal. * prj-nmsc.adb (Check_File_Naming_Schemes): Remove useless formal 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com> * gnat_rm.texi: Add a section on attribute Descriptor_Size From-SVN: r178587
Diffstat (limited to 'gcc/ada/lib-xref.adb')
-rw-r--r--gcc/ada/lib-xref.adb10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/ada/lib-xref.adb b/gcc/ada/lib-xref.adb
index 0210757..f16e8ab 100644
--- a/gcc/ada/lib-xref.adb
+++ b/gcc/ada/lib-xref.adb
@@ -512,6 +512,16 @@ package body Lib.Xref is
return False;
end if;
end if;
+
+ -- A reference to a formal in a named parameter association does
+ -- not make the formal referenced. Formals that are unused in the
+ -- subprogram body are properly flagged as such, even if calls
+ -- elsewhere use named notation.
+
+ elsif Nkind (P) = N_Parameter_Association
+ and then N = Selector_Name (P)
+ then
+ return False;
end if;
end if;