* restrict.ads:
Add missing restrictions, and properly label all GNAT defined ones
* rtsfind.ads:
Add entry for Ada_Real_Time.Timing_Events.Timing_Event
Add entry for Ada.Task_Termination.Set_Specific_Handler
Add entry for Ada.Task_Termination.Specific_Handler
* s-rident.ads:
Add missing restrictions and properly mark all gnat defined ones
* sem_ch3.adb:
(Analyze_Object_Declaration): Check No_Local_Timing_Events restriction
* sem_res.adb:
(Resolve_Call): Check violation of No_Specific_Termination_Handlers
* gnat_rm.texi: Add missing restrictions, and properly label all
GNAT defined ones
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@136087
138bc75d-0d04-0410-961f-
82ee72b054a4
no calls to Task_Identification.Abort_Task.
@item No_Asynchronous_Control
no calls to Task_Identification.Abort_Task.
@item No_Asynchronous_Control
-[RM D.7] There are no semantic dependences on the package
+There are no semantic dependences on the package
Asynchronous_Task_Control.
@item No_Calendar
Asynchronous_Task_Control.
@item No_Calendar
Protected objects and access types that designate
such objects shall be declared only at library level.
Protected objects and access types that designate
such objects shall be declared only at library level.
+@item No_Local_Timing_Events
+[RM D.7] All objects of type Ada.Timing_Events.Timing_Event are
+declared at the library level.
+
@item No_Protected_Type_Allocators
There are no allocators for protected types or
types containing protected subcomponents.
@item No_Protected_Type_Allocators
There are no allocators for protected types or
types containing protected subcomponents.
@item No_Select_Statements
There are no select_statements.
@item No_Select_Statements
There are no select_statements.
+@item No_Specific_Termination_Handlers
+[RM D.7] There are no calls to Ada.Task_Termination.Set_Specific_Handler
+or to Ada.Task_Termination.Specific_Handler.
+
@item No_Task_Allocators
[RM D.7] There are no allocators for task types
or types containing task subcomponents.
@item No_Task_Allocators
[RM D.7] There are no allocators for task types
or types containing task subcomponents.
@item No_Task_Termination
Tasks which terminate are erroneous.
@item No_Task_Termination
Tasks which terminate are erroneous.
+@item No_Unchecked_Conversion
+There are no semantic dependencies on the Ada.Unchecked_Conversion package.
+
+@item No_Unchecked_Deallocation
+There are no semantic dependencies on the Ada.Unchecked_Deallocation package.
+
@item Simple_Barriers
Entry barrier condition expressions shall be either static
boolean expressions or boolean objects which are declared in
@item Simple_Barriers
Entry barrier condition expressions shall be either static
boolean expressions or boolean objects which are declared in
Implementation_Restriction : array (All_Restrictions) of Boolean :=
(Simple_Barriers => True,
Implementation_Restriction : array (All_Restrictions) of Boolean :=
(Simple_Barriers => True,
+ No_Asynchronous_Control => True,
No_Calendar => True,
No_Dispatching_Calls => True,
No_Dynamic_Attachment => True,
No_Calendar => True,
No_Dispatching_Calls => True,
No_Dynamic_Attachment => True,
+ No_Elaboration_Code => True,
No_Enumeration_Maps => True,
No_Entry_Calls_In_Elaboration_Code => True,
No_Entry_Queue => True,
No_Exception_Handlers => True,
No_Exception_Registration => True,
No_Enumeration_Maps => True,
No_Entry_Calls_In_Elaboration_Code => True,
No_Entry_Queue => True,
No_Exception_Handlers => True,
No_Exception_Registration => True,
+ No_Implementation_Attributes => True,
+ No_Implementation_Pragmas => True,
No_Implicit_Conditionals => True,
No_Implicit_Dynamic_Code => True,
No_Implicit_Loops => True,
No_Implicit_Conditionals => True,
No_Implicit_Dynamic_Code => True,
No_Implicit_Loops => True,
No_Streams => True,
No_Task_Attributes_Package => True,
No_Task_Termination => True,
No_Streams => True,
No_Task_Attributes_Package => True,
No_Task_Termination => True,
+ No_Unchecked_Conversion => True,
+ No_Unchecked_Deallocation => True,
No_Wide_Characters => True,
Static_Priorities => True,
Static_Storage_Size => True,
No_Wide_Characters => True,
Static_Priorities => True,
Static_Storage_Size => True,
- No_Implementation_Attributes => True,
- No_Implementation_Pragmas => True,
- No_Elaboration_Code => True,
others => False);
-- The following table records entries made by Restrictions pragmas
others => False);
-- The following table records entries made by Restrictions pragmas
-- Children of Ada.Real_Time
Ada_Real_Time_Delays,
-- Children of Ada.Real_Time
Ada_Real_Time_Delays,
+ Ada_Real_Time_Timing_Events,
-- Children of Ada.Streams
-- Children of Ada.Streams
-- Range of values for children of Ada.Interrupts
subtype Ada_Real_Time_Child is Ada_Child
-- Range of values for children of Ada.Interrupts
subtype Ada_Real_Time_Child is Ada_Child
- range Ada_Real_Time_Delays .. Ada_Real_Time_Delays;
+ range Ada_Real_Time_Delays .. Ada_Real_Time_Timing_Events;
-- Range of values for children of Ada.Real_Time
subtype Ada_Streams_Child is Ada_Child
-- Range of values for children of Ada.Real_Time
subtype Ada_Streams_Child is Ada_Child
+ RO_CA_Time, -- Ada.Calendar
+
+ RO_CA_Delay_For, -- Ada.Calendar.Delays
+ RO_CA_Delay_Until, -- Ada.Calendar.Delays
+ RO_CA_To_Duration, -- Ada.Calendar.Delays
+
RE_Set_Deadline, -- Ada.Dispatching.EDF
RE_Code_Loc, -- Ada.Exceptions
RE_Set_Deadline, -- Ada.Dispatching.EDF
RE_Code_Loc, -- Ada.Exceptions
RE_Names, -- Ada.Interrupts.Names
RE_Names, -- Ada.Interrupts.Names
+ RE_Clock, -- Ada.Real_Time
+ RE_Time_Span, -- Ada.Real_Time
+ RE_Time_Span_Zero, -- Ada.Real_Time
+ RO_RT_Time, -- Ada.Real_Time
+
+ RO_RT_Delay_Until, -- Ada.Real_Time.Delays
+ RO_RT_To_Duration, -- Ada.Real_Time.Delays
+
+ RE_Timing_Event, -- Ada_Real_Time_Timing_Events
+
RE_Root_Stream_Type, -- Ada.Streams
RE_Stream_Element, -- Ada.Streams
RE_Root_Stream_Type, -- Ada.Streams
RE_Stream_Element, -- Ada.Streams
RE_TK_Tagged, -- Ada.Tags
RE_TK_Task, -- Ada.Tags
RE_TK_Tagged, -- Ada.Tags
RE_TK_Task, -- Ada.Tags
+ RE_Set_Specific_Handler, -- Ada.Task_Termination
+ RE_Specific_Handler, -- Ada.Task_Termination
+
RE_Abort_Task, -- Ada.Task_Identification
RE_Current_Task, -- Ada.Task_Identification
RO_AT_Task_Id, -- Ada.Task_Identification
RE_Abort_Task, -- Ada.Task_Identification
RE_Current_Task, -- Ada.Task_Identification
RO_AT_Task_Id, -- Ada.Task_Identification
- RO_CA_Time, -- Ada.Calendar
-
- RO_CA_Delay_For, -- Ada.Calendar.Delays
- RO_CA_Delay_Until, -- Ada.Calendar.Delays
- RO_CA_To_Duration, -- Ada.Calendar.Delays
-
- RE_Clock, -- Ada.Real_Time
- RE_Time_Span, -- Ada.Real_Time
- RE_Time_Span_Zero, -- Ada.Real_Time
- RO_RT_Time, -- Ada.Real_Time
-
- RO_RT_Delay_Until, -- Ada.Real_Time.Delays
- RO_RT_To_Duration, -- Ada.Real_Time.Delays
-
RE_Integer_64, -- Interfaces
RE_Unsigned_8, -- Interfaces
RE_Unsigned_16, -- Interfaces
RE_Integer_64, -- Interfaces
RE_Unsigned_8, -- Interfaces
RE_Unsigned_16, -- Interfaces
RO_TS_Set_Entry_Name, -- System.Tasking.Stages
RE_Terminated); -- System.Tasking.Stages
RO_TS_Set_Entry_Name, -- System.Tasking.Stages
RE_Terminated); -- System.Tasking.Stages
- -- The following declarations build a table that is indexed by the
- -- RTE function to determine the unit containing the given entity.
- -- This table is sorted in order of package names.
+ -- The following declarations build a table that is indexed by the RTE
+ -- function to determine the unit containing the given entity. This table
+ -- is sorted in order of package names.
RE_Unit_Table : array (RE_Id) of RTU_Id := (
RE_Null => RTU_Null,
RE_Unit_Table : array (RE_Id) of RTU_Id := (
RE_Null => RTU_Null,
+ RO_CA_Time => Ada_Calendar,
+
+ RO_CA_Delay_For => Ada_Calendar_Delays,
+ RO_CA_Delay_Until => Ada_Calendar_Delays,
+ RO_CA_To_Duration => Ada_Calendar_Delays,
+
RE_Set_Deadline => Ada_Dispatching_EDF,
RE_Code_Loc => Ada_Exceptions,
RE_Set_Deadline => Ada_Dispatching_EDF,
RE_Code_Loc => Ada_Exceptions,
RE_Names => Ada_Interrupts_Names,
RE_Names => Ada_Interrupts_Names,
+ RE_Clock => Ada_Real_Time,
+ RE_Time_Span => Ada_Real_Time,
+ RE_Time_Span_Zero => Ada_Real_Time,
+ RO_RT_Time => Ada_Real_Time,
+
+ RO_RT_Delay_Until => Ada_Real_Time_Delays,
+ RO_RT_To_Duration => Ada_Real_Time_Delays,
+
+ RE_Timing_Event => Ada_Real_Time_Timing_Events,
+
RE_Root_Stream_Type => Ada_Streams,
RE_Stream_Element => Ada_Streams,
RE_Root_Stream_Type => Ada_Streams,
RE_Stream_Element => Ada_Streams,
RE_TK_Tagged => Ada_Tags,
RE_TK_Task => Ada_Tags,
RE_TK_Tagged => Ada_Tags,
RE_TK_Task => Ada_Tags,
+ RE_Set_Specific_Handler => Ada_Task_Termination,
+ RE_Specific_Handler => Ada_Task_Termination,
+
RE_Abort_Task => Ada_Task_Identification,
RE_Current_Task => Ada_Task_Identification,
RO_AT_Task_Id => Ada_Task_Identification,
RE_Abort_Task => Ada_Task_Identification,
RE_Current_Task => Ada_Task_Identification,
RO_AT_Task_Id => Ada_Task_Identification,
- RO_CA_Time => Ada_Calendar,
- RO_CA_Delay_For => Ada_Calendar_Delays,
- RO_CA_Delay_Until => Ada_Calendar_Delays,
- RO_CA_To_Duration => Ada_Calendar_Delays,
-
- RE_Clock => Ada_Real_Time,
- RE_Time_Span => Ada_Real_Time,
- RE_Time_Span_Zero => Ada_Real_Time,
- RO_RT_Time => Ada_Real_Time,
- RO_RT_Delay_Until => Ada_Real_Time_Delays,
- RO_RT_To_Duration => Ada_Real_Time_Delays,
-
RE_Integer_64 => Interfaces,
RE_Unsigned_8 => Interfaces,
RE_Unsigned_16 => Interfaces,
RE_Integer_64 => Interfaces,
RE_Unsigned_8 => Interfaces,
RE_Unsigned_16 => Interfaces,
No_Implicit_Loops, -- GNAT
No_Initialize_Scalars, -- GNAT
No_Local_Allocators, -- (RM H.4(8))
No_Implicit_Loops, -- GNAT
No_Initialize_Scalars, -- GNAT
No_Local_Allocators, -- (RM H.4(8))
+ No_Local_Timing_Events, -- (RM D.7(10.2/2))
No_Local_Protected_Objects, -- GNAT
No_Nested_Finalization, -- (RM D.7(4))
No_Protected_Type_Allocators, -- GNAT
No_Local_Protected_Objects, -- GNAT
No_Nested_Finalization, -- (RM D.7(4))
No_Protected_Type_Allocators, -- GNAT
No_Requeue_Statements, -- GNAT
No_Secondary_Stack, -- GNAT
No_Select_Statements, -- GNAT (Ravenscar)
No_Requeue_Statements, -- GNAT
No_Secondary_Stack, -- GNAT
No_Select_Statements, -- GNAT (Ravenscar)
+ No_Specific_Termination_Handlers, -- (RM D.7(10.7/2))
No_Standard_Storage_Pools, -- GNAT
No_Streams, -- GNAT
No_Task_Allocators, -- (RM D.7(7))
No_Standard_Storage_Pools, -- GNAT
No_Streams, -- GNAT
No_Task_Allocators, -- (RM D.7(7))
then
Set_In_Private_Part (Id);
end if;
then
Set_In_Private_Part (Id);
end if;
+
+ -- Check for violation of No_Local_Timing_Events
+
+ if Is_RTE (Etype (Id), RE_Timing_Event)
+ and then not Is_Library_Level_Entity (Id)
+ then
+ Check_Restriction (No_Local_Timing_Events, N);
+ end if;
end Analyze_Object_Declaration;
---------------------------
end Analyze_Object_Declaration;
---------------------------
Check_Intrinsic_Call (N);
end if;
Check_Intrinsic_Call (N);
end if;
+ -- Check for violation of restriction No_Specific_Termination_Handlers
+
+ if Is_RTE (Nam, RE_Set_Specific_Handler)
+ or else
+ Is_RTE (Nam, RE_Specific_Handler)
+ then
+ Check_Restriction (No_Specific_Termination_Handlers, N);
+ end if;
+
-- All done, evaluate call and deal with elaboration issues
Eval_Call (N);
-- All done, evaluate call and deal with elaboration issues
Eval_Call (N);