aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2015-10-20 12:15:46 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2015-10-20 14:15:46 +0200
commit6bf8c157bf8121f26182fc05182ec6c0c6ecf9e0 (patch)
treee0ac56de57bdf0b086a199dc03aafbe995537020 /gcc/ada
parentda16002615ce7908f1599313dddc2e72702fcba9 (diff)
downloadgcc-6bf8c157bf8121f26182fc05182ec6c0c6ecf9e0.zip
gcc-6bf8c157bf8121f26182fc05182ec6c0c6ecf9e0.tar.gz
gcc-6bf8c157bf8121f26182fc05182ec6c0c6ecf9e0.tar.bz2
s-rident.ads: No_Task_At_Interrupt_Priority: New restriction.
2015-10-20 Tristan Gingold <gingold@adacore.com> * s-rident.ads: No_Task_At_Interrupt_Priority: New restriction. * sem_prag.adb (Analyze_Pragma): Check the restriction. * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Check the restriction (for aspects). From-SVN: r229063
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog7
-rw-r--r--gcc/ada/s-rident.ads1
-rw-r--r--gcc/ada/sem_ch13.adb6
-rw-r--r--gcc/ada/sem_prag.adb6
4 files changed, 20 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 9830861..3461bd8 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,10 @@
+2015-10-20 Tristan Gingold <gingold@adacore.com>
+
+ * s-rident.ads: No_Task_At_Interrupt_Priority: New restriction.
+ * sem_prag.adb (Analyze_Pragma): Check the restriction.
+ * sem_ch13.adb (Analyze_Attribute_Definition_Clause):
+ Check the restriction (for aspects).
+
2015-10-20 Gary Dismukes <dismukes@adacore.com>
* sem_prag.adb: Minor reformatting.
diff --git a/gcc/ada/s-rident.ads b/gcc/ada/s-rident.ads
index 4fdb6ac..4fd71eb 100644
--- a/gcc/ada/s-rident.ads
+++ b/gcc/ada/s-rident.ads
@@ -144,6 +144,7 @@ package System.Rident is
No_Streams, -- GNAT
No_Task_Allocators, -- (RM D.7(7))
No_Task_Attributes_Package, -- GNAT
+ No_Task_At_Interrupt_Priority, -- GNAT
No_Task_Hierarchy, -- (RM D.7(3), H.4(3))
No_Task_Termination, -- GNAT (Ravenscar)
No_Tasking, -- GNAT
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb
index 820a2d1..7b5e1b8 100644
--- a/gcc/ada/sem_ch13.adb
+++ b/gcc/ada/sem_ch13.adb
@@ -5266,6 +5266,12 @@ package body Sem_Ch13 is
(Expr, RTE (RE_Interrupt_Priority));
Uninstall_Discriminants_And_Pop_Scope (U_Ent);
+
+ -- Check the No_Task_At_Interrupt_Priority restriction
+
+ if Is_Task_Type (U_Ent) then
+ Check_Restriction (No_Task_At_Interrupt_Priority, N);
+ end if;
end if;
else
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
index be5c37b..46fbbe4 100644
--- a/gcc/ada/sem_prag.adb
+++ b/gcc/ada/sem_prag.adb
@@ -15566,6 +15566,12 @@ package body Sem_Prag is
Check_Duplicate_Pragma (Ent);
Record_Rep_Item (Ent, N);
+
+ -- Check the No_Task_At_Interrupt_Priority restriction
+
+ if Nkind (P) = N_Task_Definition then
+ Check_Restriction (No_Task_At_Interrupt_Priority, N);
+ end if;
end if;
end Interrupt_Priority;