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-3786] ada: Preanalyze classwide contracts as spec expressions Date: Tue, 8 Nov 2022 08:41:15 +0000 (GMT) [thread overview] Message-ID: <20221108084115.3CAD93858D3C@sourceware.org> (raw) https://gcc.gnu.org/g:788e5f06d4e804dcc9e255fa448ba0c3db1586c4 commit r13-3786-g788e5f06d4e804dcc9e255fa448ba0c3db1586c4 Author: Ronan Desplanques <desplanques@adacore.com> Date: Mon Oct 17 12:00:09 2022 +0200 ada: Preanalyze classwide contracts as spec expressions Classwide contracts are "spec expressions" as defined in the documentation in sem.ads. Before this patch, the instances of classwide contracts that are destined to class conditions merging were not preanalyzed as spec expressions. That caused preanalysis to emit spurious errors in some cases. gcc/ada/ * contracts.adb (Preanalyze_Condition): Use Preanalyze_Spec_Expression. Diff: --- gcc/ada/contracts.adb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/ada/contracts.adb b/gcc/ada/contracts.adb index a300d739eff..21f438f90f3 100644 --- a/gcc/ada/contracts.adb +++ b/gcc/ada/contracts.adb @@ -42,13 +42,13 @@ with Nmake; use Nmake; with Opt; use Opt; with Sem; use Sem; with Sem_Aux; use Sem_Aux; +with Sem_Ch3; use Sem_Ch3; with Sem_Ch6; use Sem_Ch6; with Sem_Ch8; use Sem_Ch8; with Sem_Ch12; use Sem_Ch12; with Sem_Ch13; use Sem_Ch13; with Sem_Disp; use Sem_Disp; with Sem_Prag; use Sem_Prag; -with Sem_Res; use Sem_Res; with Sem_Type; use Sem_Type; with Sem_Util; use Sem_Util; with Sinfo; use Sinfo; @@ -4755,7 +4755,7 @@ package body Contracts is Install_Formals (Subp); Inside_Class_Condition_Preanalysis := True; - Preanalyze_And_Resolve (Expr, Standard_Boolean); + Preanalyze_Spec_Expression (Expr, Standard_Boolean); Inside_Class_Condition_Preanalysis := False; Remove_Formals (Subp);
reply other threads:[~2022-11-08 8:41 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=20221108084115.3CAD93858D3C@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).