aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEd Schonberg <schonberg@adacore.com>2008-08-22 15:25:08 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2008-08-22 15:25:08 +0200
commitc56094bda771cc3bc600347812f9fcc211764f67 (patch)
tree5e01bb62c95e1fbe63e3a8ade6d751e2ed294e2a /gcc
parent8b91af8d3c88be2e7f1b4820d3bfeb9bcec907ac (diff)
downloadgcc-c56094bda771cc3bc600347812f9fcc211764f67.zip
gcc-c56094bda771cc3bc600347812f9fcc211764f67.tar.gz
gcc-c56094bda771cc3bc600347812f9fcc211764f67.tar.bz2
sem_ch8.adb (Use_One_Type): Do not emit warning message about redundant use_type_clause in an instance.
2008-08-22 Ed Schonberg <schonberg@adacore.com> * sem_ch8.adb (Use_One_Type): Do not emit warning message about redundant use_type_clause in an instance. From-SVN: r139457
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/sem_ch8.adb4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb
index cf9a387..96eac0e 100644
--- a/gcc/ada/sem_ch8.adb
+++ b/gcc/ada/sem_ch8.adb
@@ -7054,8 +7054,12 @@ package body Sem_Ch8 is
-- as use visible. The analysis then reinstalls the spec along with
-- its context. The use clause P.T is now recognized as redundant,
-- but in the wrong context. Do not emit a warning in such cases.
+ -- Do not emit a warning either if we are in an instance, there
+ -- is no redundancy between an outer use_clause and one that appears
+ -- within the generic.
and then not Spec_Reloaded_For_Body
+ and then not In_Instance
then
-- The type already has a use clause