diff options
author | Justin Squirek <squirek@adacore.com> | 2021-11-16 10:50:06 -0500 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-12-01 10:24:41 +0000 |
commit | b940999de44208a0659d9441393fa3f62be24f28 (patch) | |
tree | 749e701d5136aa77d699dd2b01cd37c1551677ae | |
parent | 8ba38e8c8b737df2734c06486a7fc39f4be78f43 (diff) | |
download | gcc-b940999de44208a0659d9441393fa3f62be24f28.zip gcc-b940999de44208a0659d9441393fa3f62be24f28.tar.gz gcc-b940999de44208a0659d9441393fa3f62be24f28.tar.bz2 |
[Ada] Spurious warning when using 'Type_Key on generic formal
gcc/ada/
* sem_attr.adb (Type_Key): Avoid premature use warnings when the
prefix is a generic actual.
-rw-r--r-- | gcc/ada/sem_attr.adb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index 2575ddf..ef7437a 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -6664,6 +6664,7 @@ package body Sem_Attr is if not Is_Frozen (Entity (P)) and then not Is_Generic_Type (Entity (P)) + and then not Is_Generic_Actual_Type (Entity (P)) then Error_Msg_N ("premature usage of Type_Key?", N); end if; |