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-4188] ada: Tweak error messages on misplaced with keywords Date: Mon, 21 Nov 2022 10:12:40 +0000 (GMT) [thread overview] Message-ID: <20221121101241.2EF5C3857C51@sourceware.org> (raw) https://gcc.gnu.org/g:8bebbf7b463693316a1518ba31c04648cb629b23 commit r13-4188-g8bebbf7b463693316a1518ba31c04648cb629b23 Author: Ronan Desplanques <desplanques@adacore.com> Date: Wed Nov 9 13:32:05 2022 +0100 ada: Tweak error messages on misplaced with keywords Before this patch, with clauses placed in declarative sections were interpreted by the compiler as incorrect aspect specifications, which led to confusing error messages. This patch makes it so more syntax errors involving the with keyword are diagnosed as intended with clauses instead of aspect specifications. gcc/ada/ * par-ch3.adb (P_Declarative_Item): Tweak handling of with keyword. Diff: --- gcc/ada/par-ch3.adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/ada/par-ch3.adb b/gcc/ada/par-ch3.adb index aac45890c97..483f96d041f 100644 --- a/gcc/ada/par-ch3.adb +++ b/gcc/ada/par-ch3.adb @@ -4682,7 +4682,7 @@ package body Ch3 is when Tok_With => Check_Bad_Layout; - if Aspect_Specifications_Present then + if Aspect_Specifications_Present (Strict => True) then -- If we are after a semicolon, complain that it was ignored. -- But we don't really ignore it, since we dump the aspects,
reply other threads:[~2022-11-21 10:12 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=20221121101241.2EF5C3857C51@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).