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-1509] [Ada] Non-static Interrupt_Priority allowed with restriction Static_Priorities Date: Wed, 16 Jun 2021 08:45:08 +0000 (GMT) [thread overview] Message-ID: <20210616084508.4C0AD398A87D@sourceware.org> (raw) https://gcc.gnu.org/g:c5dc00ef38d2c3ac647726b0215888f75b0e4d9c commit r12-1509-gc5dc00ef38d2c3ac647726b0215888f75b0e4d9c Author: Justin Squirek <squirek@adacore.com> Date: Sat Feb 27 19:09:48 2021 -0500 [Ada] Non-static Interrupt_Priority allowed with restriction Static_Priorities gcc/ada/ * sem_ch13.adb (Make_Aitem_Pragma): Check for static expressions in Priority aspect arguments for restriction Static_Priorities. Diff: --- gcc/ada/sem_ch13.adb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index 8aa62c89deb..4fa17f1ddb4 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -3382,6 +3382,13 @@ package body Sem_Ch13 is | Aspect_Interrupt_Priority | Aspect_Priority => + -- Verify the expression is static when Static_Priorities is + -- enabled. + + if not Is_OK_Static_Expression (Expr) then + Check_Restriction (Static_Priorities, Expr); + end if; + if Nkind (N) in N_Subprogram_Body | N_Subprogram_Declaration then -- Analyze the aspect expression
reply other threads:[~2021-06-16 8:45 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=20210616084508.4C0AD398A87D@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).