public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-6469] [Ada] Task arrays trigger spurious unreferenced warnings
@ 2022-01-11 13:28 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2022-01-11 13:28 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:1be42e5907524af490afdec8ff2e200e69bfa8aa

commit r12-6469-g1be42e5907524af490afdec8ff2e200e69bfa8aa
Author: Justin Squirek <squirek@adacore.com>
Date:   Tue Dec 28 19:32:51 2021 +0000

    [Ada] Task arrays trigger spurious unreferenced warnings
    
    gcc/ada/
    
            * sem_warn.adb (Check_References): Add call to Has_Task instead
            of checking component type.

Diff:
---
 gcc/ada/sem_warn.adb | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/gcc/ada/sem_warn.adb b/gcc/ada/sem_warn.adb
index 72627af6121..e02f6e04947 100644
--- a/gcc/ada/sem_warn.adb
+++ b/gcc/ada/sem_warn.adb
@@ -1701,13 +1701,10 @@ package body Sem_Warn is
                           and then Ekind (E1) /= E_Constant
                           and then Ekind (E1) /= E_Component)
 
-                         --  Check that E1T is not a task or an array of them
+                         --  Check that E1T is not a task or a composite type
+                         --  with a task component.
 
-                         or else not
-                           (Is_Task_Type (E1T)
-                             or else (Ekind (E1T) in Array_Kind
-                                       and then Is_Task_Type
-                                                  (Component_Type (E1T)))))
+                         or else not Has_Task (E1T))
 
               --  For subunits, only place warnings on the main unit itself,
               --  since parent units are not completely compiled.


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

only message in thread, other threads:[~2022-01-11 13:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-11 13:28 [gcc r12-6469] [Ada] Task arrays trigger spurious unreferenced warnings 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).