public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Marc Poulhi?s <dkm@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-3730] ada: Reject boxes in delta array aggregates Date: Mon, 7 Nov 2022 08:39:02 +0000 (GMT) [thread overview] Message-ID: <20221107083902.71FBA3858C36@sourceware.org> (raw) https://gcc.gnu.org/g:2caaa4bf336bce2a7d649aa05f2851d576a26e5e commit r13-3730-g2caaa4bf336bce2a7d649aa05f2851d576a26e5e Author: Piotr Trojanek <trojanek@adacore.com> Date: Thu Oct 14 17:50:43 2021 +0200 ada: Reject boxes in delta array aggregates Implement Ada 2022 4.3.4(11/5), which rejects box compound delimiter <> in delta record aggregates, just like another rule rejects it in delta array aggregates. gcc/ada/ * sem_aggr.adb (Resolve_Delta_Array_Aggregate): Reject boxes in delta array aggregates. Diff: --- gcc/ada/sem_aggr.adb | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb index 87a8c1a3c40..31ce9cadd94 100644 --- a/gcc/ada/sem_aggr.adb +++ b/gcc/ada/sem_aggr.adb @@ -3531,7 +3531,18 @@ package body Sem_Aggr is Next (Choice); end loop; - Analyze_And_Resolve (Expression (Assoc), Component_Type (Typ)); + -- For an array_delta_aggregate, the array_component_association + -- shall not use the box symbol <>; RM 4.3.4(11/5). + + pragma Assert + (Box_Present (Assoc) xor Present (Expression (Assoc))); + + if Box_Present (Assoc) then + Error_Msg_N + ("'<'> in array delta aggregate is not allowed", Assoc); + else + Analyze_And_Resolve (Expression (Assoc), Component_Type (Typ)); + end if; end if; Next (Assoc);
reply other threads:[~2022-11-07 8:39 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=20221107083902.71FBA3858C36@sourceware.org \ --to=dkm@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).