From: Justin Squirek Date: Tue, 16 Nov 2021 15:50:06 +0000 (-0500) Subject: [Ada] Spurious warning when using 'Type_Key on generic formal X-Git-Tag: basepoints/gcc-13~2642 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b940999de44208a0659d9441393fa3f62be24f28;p=thirdparty%2Fgcc.git [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 --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index 2575ddfe86d7..ef7437a0dd0d 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;