[gcc r12-5671] [Ada] Spurious warning when using 'Type_Key on generic formal
Pierre-Marie de Rodat
pmderodat@gcc.gnu.org
Wed Dec 1 10:26:35 GMT 2021
https://gcc.gnu.org/g:b940999de44208a0659d9441393fa3f62be24f28
commit r12-5671-gb940999de44208a0659d9441393fa3f62be24f28
Author: Justin Squirek <squirek@adacore.com>
Date: Tue Nov 16 10:50:06 2021 -0500
[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.
Diff:
---
gcc/ada/sem_attr.adb | 1 +
1 file changed, 1 insertion(+)
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb
index 2575ddfe86d..ef7437a0dd0 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;
More information about the Gcc-cvs
mailing list