projects
/
platform
/
upstream
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f5b4b6b
)
[Ada] Non-static Interrupt_Priority allowed with restriction Static_Priorities
author
Justin Squirek
<squirek@adacore.com>
Sun, 28 Feb 2021 00:09:48 +0000
(19:09 -0500)
committer
Pierre-Marie de Rodat
<derodat@adacore.com>
Wed, 16 Jun 2021 08:43:01 +0000
(
04:43
-0400)
gcc/ada/
* sem_ch13.adb (Make_Aitem_Pragma): Check for static expressions
in Priority aspect arguments for restriction Static_Priorities.
gcc/ada/sem_ch13.adb
patch
|
blob
|
history
diff --git
a/gcc/ada/sem_ch13.adb
b/gcc/ada/sem_ch13.adb
index 8aa62c89debcb11aa5172f699a687f6d8e0ebf6e..4fa17f1ddb417fa2987f08e830ea3135b47cbe6e 100644
(file)
--- 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