public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-1509] [Ada] Non-static Interrupt_Priority allowed with restriction Static_Priorities
@ 2021-06-16  8:45 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-06-16  8:45 UTC (permalink / raw)
  To: gcc-cvs

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-16  8:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-16  8:45 [gcc r12-1509] [Ada] Non-static Interrupt_Priority allowed with restriction Static_Priorities Pierre-Marie de Rodat

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).