public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-6469] [Ada] Task arrays trigger spurious unreferenced warnings Date: Tue, 11 Jan 2022 13:28:31 +0000 (GMT) [thread overview] Message-ID: <20220111132831.5B4A738A9402@sourceware.org> (raw) 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.
reply other threads:[~2022-01-11 13:28 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220111132831.5B4A738A9402@sourceware.org \ --to=pmderodat@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).