OSDN Git Service

New Language: Ada
[pf3gnuchains/gcc-fork.git] / gcc / ada / rident.ads
1 ------------------------------------------------------------------------------
2 --                                                                          --
3 --                         GNAT COMPILER COMPONENTS                         --
4 --                                                                          --
5 --                               R I D E N T                                --
6 --                                                                          --
7 --                                 S p e c                                  --
8 --                                                                          --
9 --                            $Revision: 1.12 $
10 --                                                                          --
11 --          Copyright (C) 1992-2001 Free Software Foundation, Inc.          --
12 --                                                                          --
13 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
14 -- terms of the  GNU General Public License as published  by the Free Soft- --
15 -- ware  Foundation;  either version 2,  or (at your option) any later ver- --
16 -- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
17 -- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
18 -- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
19 -- for  more details.  You should have  received  a copy of the GNU General --
20 -- Public License  distributed with GNAT;  see file COPYING.  If not, write --
21 -- to  the Free Software Foundation,  59 Temple Place - Suite 330,  Boston, --
22 -- MA 02111-1307, USA.                                                      --
23 --                                                                          --
24 -- GNAT was originally developed  by the GNAT team at  New York University. --
25 -- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). --
26 --                                                                          --
27 ------------------------------------------------------------------------------
28
29 --  This package defines the set of restriction identifiers. It is in a
30 --  separate package from Restrict so that it can be easily used by the
31 --  binder without dragging in a lot of stuff.
32
33 package Rident is
34
35    --  The following enumeration type defines the set of restriction
36    --  identifiers not taking a parameter that are implemented in GNAT.
37    --  To add a new restriction identifier, add an entry with the name
38    --  to be used in the pragma, and add appropriate calls to the
39    --  Check_Restriction routine.
40
41    type Restriction_Id is (
42
43       --  The following cases are checked for consistency in the binder
44
45       Boolean_Entry_Barriers,                  -- GNAT (Ravenscar)
46       No_Abort_Statements,                     -- (RM D.7(5), H.4(3))
47       No_Access_Subprograms,                   -- (RM H.4(17))
48       No_Allocators,                           -- (RM H.4(7))
49       No_Asynchronous_Control,                 -- (RM D.9(10))
50       No_Calendar,                             -- GNAT
51       No_Delay,                                -- (RM H.4(21))
52       No_Dispatch,                             -- (RM H.4(19))
53       No_Dynamic_Interrupts,                   -- GNAT
54       No_Dynamic_Priorities,                   -- (RM D.9(9))
55       No_Enumeration_Maps,                     -- GNAT
56       No_Entry_Calls_In_Elaboration_Code,      -- GNAT
57       No_Entry_Queue,                          -- GNAT
58       No_Exception_Handlers,                   -- GNAT
59       No_Exceptions,                           -- (RM H.4(12))
60       No_Fixed_Point,                          -- (RM H.4(15))
61       No_Floating_Point,                       -- (RM H.4(14))
62       No_IO,                                   -- (RM H.4(20))
63       No_Implicit_Conditionals,                -- GNAT
64       No_Implicit_Dynamic_Code,                -- GNAT
65       No_Implicit_Heap_Allocations,            -- (RM D.8(8), H.4(3))
66       No_Implicit_Loops,                       -- GNAT
67       No_Local_Allocators,                     -- (RM H.4(8))
68       No_Local_Protected_Objects,              -- GNAT
69       No_Nested_Finalization,                  -- (RM D.7(4))
70       No_Protected_Type_Allocators,            -- GNAT
71       No_Protected_Types,                      -- (RM H.4(5))
72       No_Recursion,                            -- (RM H.4(22))
73       No_Reentrancy,                           -- (RM H.4(23))
74       No_Relative_Delay,                       -- GNAT
75       No_Requeue,                              -- GNAT
76       No_Select_Statements,                    -- GNAT (Ravenscar)
77       No_Standard_Storage_Pools,               -- GNAT
78       No_Streams,                              -- GNAT
79       No_Task_Allocators,                      -- (RM D.7(7))
80       No_Task_Attributes,                      -- GNAT
81       No_Task_Hierarchy,                       -- (RM D.7(3), H.4(3))
82       No_Task_Termination,                     -- GNAT
83       No_Terminate_Alternatives,               -- (RM D.7(6))
84       No_Unchecked_Access,                     -- (RM H.4(18))
85       No_Unchecked_Conversion,                 -- (RM H.4(16))
86       No_Unchecked_Deallocation,               -- (RM H.4(9))
87       No_Wide_Characters,                      -- GNAT
88       Static_Priorities,                       -- GNAT
89       Static_Storage_Size,                     -- GNAT
90
91       --  The following cases do not require partition-wide checks
92
93       Immediate_Reclamation,                   -- (RM H.4(10))
94       No_Implementation_Attributes,            -- GNAT
95       No_Implementation_Pragmas,               -- GNAT
96       No_Implementation_Restrictions,          -- GNAT
97       No_Elaboration_Code,                     -- GNAT
98
99       Not_A_Restriction_Id);
100
101    --  The following range of Restriction identifiers is checked for
102    --  consistency across a partition. The generated ali file is marked
103    --  for each entry to show one of three possibilities:
104    --
105    --    Corresponding restriction is set (so unit does not violate it)
106    --    Corresponding restriction is not violated
107    --    Corresponding restriction is violated
108
109    subtype Partition_Restrictions is
110      Restriction_Id range Boolean_Entry_Barriers .. Static_Storage_Size;
111
112    --  The following set of Restriction identifiers is not checked for
113    --  consistency across a partition, and the generated ali files does
114    --  not carry any indications with respect to such restrictions.
115
116    subtype Compilation_Unit_Restrictions is
117      Restriction_Id range Immediate_Reclamation .. No_Elaboration_Code;
118
119    --  The following enumeration type defines the set of restriction
120    --  parameter identifiers taking a parameter that are implemented in
121    --  GNAT. To add a new restriction parameter identifier, add an entry
122    --  with the name to be used in the pragma, and add appropriate
123    --  calls to Check_Restriction.
124
125    --  Note: the GNAT implementation currently only accomodates restriction
126    --  parameter identifiers whose expression value is a non-negative
127    --  integer. This is true for all language defined parameters.
128
129    type Restriction_Parameter_Id is (
130      Max_Asynchronous_Select_Nesting,         -- (RM D.7(18), H.4(3))
131      Max_Entry_Queue_Depth,                   -- GNAT
132      Max_Protected_Entries,                   -- (RM D.7(14))
133      Max_Select_Alternatives,                 -- (RM D.7(12))
134      Max_Storage_At_Blocking,                 -- (RM D.7(17))
135      Max_Task_Entries,                        -- (RM D.7(13), H.4(3))
136      Max_Tasks,                               -- (RM D.7(19), H.4(3))
137      Not_A_Restriction_Parameter_Id);
138
139 end Rident;