diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2022-06-28 18:51:30 +0200 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2022-07-12 12:24:14 +0000 |
commit | 433cefcd0252ad8aae2aa8a69fbd9900809063b7 (patch) | |
tree | 09d1652cfa70a2ac0f2263509b89871328232eda /gcc/ada/fe.h | |
parent | 0ff936fe86ddff4d4a95a4ca9eda85ad0287ffa5 (diff) | |
download | gcc-433cefcd0252ad8aae2aa8a69fbd9900809063b7.zip gcc-433cefcd0252ad8aae2aa8a69fbd9900809063b7.tar.gz gcc-433cefcd0252ad8aae2aa8a69fbd9900809063b7.tar.bz2 |
[Ada] Extend No_Dependence restriction to code generation
This makes it possible to report violations of the No_Dependence restriction
during code generation, in other words outside of the Ada front-end proper.
These violations are supposed to be only for child units of System, so the
implementation is restricted to these cases.
gcc/ada/
* restrict.ads (type ND_Entry): Add System_Child component.
(Check_Restriction_No_Dependence_On_System): Declare.
* restrict.adb (Global_Restriction_No_Tasking): Move around.
(Violation_Of_No_Dependence): New procedure.
(Check_Restriction_No_Dependence): Call Violation_Of_No_Dependence
to report a violation.
(Check_Restriction_No_Dependence_On_System): New procedure.
(Set_Restriction_No_Dependenc): Set System_Child component if the
unit is a child of System.
* snames.ads-tmpl (Name_Arith_64): New package name.
(Name_Arith_128): Likewise.
(Name_Memory): Likewise.
(Name_Stack_Checking): Likewise.
* fe.h (Check_Restriction_No_Dependence_On_System): Declare.
Diffstat (limited to 'gcc/ada/fe.h')
-rw-r--r-- | gcc/ada/fe.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/ada/fe.h b/gcc/ada/fe.h index 983f6c3..b002bdc 100644 --- a/gcc/ada/fe.h +++ b/gcc/ada/fe.h @@ -252,6 +252,8 @@ extern Boolean SJLJ_Exceptions (void); restrict__check_no_implicit_protected_alloc #define Check_No_Implicit_Task_Alloc \ restrict__check_no_implicit_task_alloc +#define Check_Restriction_No_Dependence_On_System \ + restrict__check_restriction_no_dependence_on_system #define No_Exception_Handlers_Set \ restrict__no_exception_handlers_set #define No_Exception_Propagation_Active \ @@ -262,6 +264,7 @@ extern void Check_Implicit_Dynamic_Code_Allowed (Node_Id); extern void Check_No_Implicit_Heap_Alloc (Node_Id); extern void Check_No_Implicit_Protected_Alloc (Node_Id); extern void Check_No_Implicit_Task_Alloc (Node_Id); +extern void Check_Restriction_No_Dependence_On_System (Name_Id, Node_Id); extern Boolean No_Exception_Handlers_Set (void); extern Boolean No_Exception_Propagation_Active (void); |