public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-5671] [Ada] Spurious warning when using 'Type_Key on generic formal
@ 2021-12-01 10:26 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-12-01 10:26 UTC (permalink / raw)
  To: gcc-cvs

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;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-12-01 10:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-01 10:26 [gcc r12-5671] [Ada] Spurious warning when using 'Type_Key on generic formal Pierre-Marie de Rodat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).