annotate gcc/ada/sem_ch3.ads @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ------------------------------------------------------------------------------
kono
parents:
diff changeset
2 -- --
kono
parents:
diff changeset
3 -- GNAT COMPILER COMPONENTS --
kono
parents:
diff changeset
4 -- --
kono
parents:
diff changeset
5 -- S E M _ C H 3 --
kono
parents:
diff changeset
6 -- --
kono
parents:
diff changeset
7 -- S p e c --
kono
parents:
diff changeset
8 -- --
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
9 -- Copyright (C) 1992-2018, Free Software Foundation, Inc. --
111
kono
parents:
diff changeset
10 -- --
kono
parents:
diff changeset
11 -- GNAT is free software; you can redistribute it and/or modify it under --
kono
parents:
diff changeset
12 -- terms of the GNU General Public License as published by the Free Soft- --
kono
parents:
diff changeset
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
kono
parents:
diff changeset
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
kono
parents:
diff changeset
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
kono
parents:
diff changeset
16 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
kono
parents:
diff changeset
17 -- for more details. You should have received a copy of the GNU General --
kono
parents:
diff changeset
18 -- Public License distributed with GNAT; see file COPYING3. If not, go to --
kono
parents:
diff changeset
19 -- http://www.gnu.org/licenses for a complete copy of the license. --
kono
parents:
diff changeset
20 -- --
kono
parents:
diff changeset
21 -- GNAT was originally developed by the GNAT team at New York University. --
kono
parents:
diff changeset
22 -- Extensive contributions were provided by Ada Core Technologies Inc. --
kono
parents:
diff changeset
23 -- --
kono
parents:
diff changeset
24 ------------------------------------------------------------------------------
kono
parents:
diff changeset
25
kono
parents:
diff changeset
26 with Nlists; use Nlists;
kono
parents:
diff changeset
27 with Types; use Types;
kono
parents:
diff changeset
28
kono
parents:
diff changeset
29 package Sem_Ch3 is
kono
parents:
diff changeset
30 procedure Analyze_Component_Declaration (N : Node_Id);
kono
parents:
diff changeset
31 procedure Analyze_Full_Type_Declaration (N : Node_Id);
kono
parents:
diff changeset
32 procedure Analyze_Incomplete_Type_Decl (N : Node_Id);
kono
parents:
diff changeset
33 procedure Analyze_Itype_Reference (N : Node_Id);
kono
parents:
diff changeset
34 procedure Analyze_Number_Declaration (N : Node_Id);
kono
parents:
diff changeset
35 procedure Analyze_Object_Declaration (N : Node_Id);
kono
parents:
diff changeset
36 procedure Analyze_Others_Choice (N : Node_Id);
kono
parents:
diff changeset
37 procedure Analyze_Private_Extension_Declaration (N : Node_Id);
kono
parents:
diff changeset
38 procedure Analyze_Subtype_Indication (N : Node_Id);
kono
parents:
diff changeset
39 procedure Analyze_Variant_Part (N : Node_Id);
kono
parents:
diff changeset
40
kono
parents:
diff changeset
41 procedure Analyze_Subtype_Declaration
kono
parents:
diff changeset
42 (N : Node_Id;
kono
parents:
diff changeset
43 Skip : Boolean := False);
kono
parents:
diff changeset
44 -- Called to analyze a subtype declaration. The parameter Skip is used for
kono
parents:
diff changeset
45 -- Ada 2005 (AI-412). We set to True in order to avoid reentering the
kono
parents:
diff changeset
46 -- defining identifier of N when analyzing a rewritten incomplete subtype
kono
parents:
diff changeset
47 -- declaration.
kono
parents:
diff changeset
48
kono
parents:
diff changeset
49 function Access_Definition
kono
parents:
diff changeset
50 (Related_Nod : Node_Id;
kono
parents:
diff changeset
51 N : Node_Id) return Entity_Id;
kono
parents:
diff changeset
52 -- An access definition defines a general access type for a formal
kono
parents:
diff changeset
53 -- parameter. The procedure is called when processing formals, when the
kono
parents:
diff changeset
54 -- current scope is the subprogram. The Implicit type is attached to the
kono
parents:
diff changeset
55 -- Related_Nod put into the enclosing scope, so that the only entities
kono
parents:
diff changeset
56 -- defined in the spec are the formals themselves.
kono
parents:
diff changeset
57
kono
parents:
diff changeset
58 procedure Access_Subprogram_Declaration
kono
parents:
diff changeset
59 (T_Name : Entity_Id;
kono
parents:
diff changeset
60 T_Def : Node_Id);
kono
parents:
diff changeset
61 -- The subprogram specification yields the signature of an implicit
kono
parents:
diff changeset
62 -- type, whose Ekind is Access_Subprogram_Type. This implicit type is the
kono
parents:
diff changeset
63 -- designated type of the declared access type. In subprogram calls, the
kono
parents:
diff changeset
64 -- signature of the implicit type works like the profile of a regular
kono
parents:
diff changeset
65 -- subprogram.
kono
parents:
diff changeset
66
kono
parents:
diff changeset
67 procedure Add_Internal_Interface_Entities (Tagged_Type : Entity_Id);
kono
parents:
diff changeset
68 -- Add to the list of primitives of Tagged_Type the internal entities
kono
parents:
diff changeset
69 -- associated with covered interface primitives. These entities link the
kono
parents:
diff changeset
70 -- interface primitives with the tagged type primitives that cover them.
kono
parents:
diff changeset
71
kono
parents:
diff changeset
72 procedure Analyze_Declarations (L : List_Id);
kono
parents:
diff changeset
73 -- Called to analyze a list of declarations (in what context ???). Also
kono
parents:
diff changeset
74 -- performs necessary freezing actions (more description needed ???)
kono
parents:
diff changeset
75
kono
parents:
diff changeset
76 procedure Analyze_Interface_Declaration (T : Entity_Id; Def : Node_Id);
kono
parents:
diff changeset
77 -- Analyze an interface declaration or a formal interface declaration
kono
parents:
diff changeset
78
kono
parents:
diff changeset
79 procedure Array_Type_Declaration (T : in out Entity_Id; Def : Node_Id);
kono
parents:
diff changeset
80 -- Process an array type declaration. If the array is constrained, we
kono
parents:
diff changeset
81 -- create an implicit parent array type, with the same index types and
kono
parents:
diff changeset
82 -- component type.
kono
parents:
diff changeset
83
kono
parents:
diff changeset
84 procedure Access_Type_Declaration (T : Entity_Id; Def : Node_Id);
kono
parents:
diff changeset
85 -- Process an access type declaration
kono
parents:
diff changeset
86
kono
parents:
diff changeset
87 procedure Build_Itype_Reference (Ityp : Entity_Id; Nod : Node_Id);
kono
parents:
diff changeset
88 -- Create a reference to an internal type, for use by Gigi. The back-end
kono
parents:
diff changeset
89 -- elaborates itypes on demand, i.e. when their first use is seen. This can
kono
parents:
diff changeset
90 -- lead to scope anomalies if the first use is within a scope that is
kono
parents:
diff changeset
91 -- nested within the scope that contains the point of definition of the
kono
parents:
diff changeset
92 -- itype. The Itype_Reference node forces the elaboration of the itype
kono
parents:
diff changeset
93 -- in the proper scope. The node is inserted after Nod, which is the
kono
parents:
diff changeset
94 -- enclosing declaration that generated Ityp.
kono
parents:
diff changeset
95 --
kono
parents:
diff changeset
96 -- A related mechanism is used during expansion, for itypes created in
kono
parents:
diff changeset
97 -- branches of conditionals. See Ensure_Defined in exp_util. Could both
kono
parents:
diff changeset
98 -- mechanisms be merged ???
kono
parents:
diff changeset
99
kono
parents:
diff changeset
100 procedure Check_Abstract_Overriding (T : Entity_Id);
kono
parents:
diff changeset
101 -- Check that all abstract subprograms inherited from T's parent type have
kono
parents:
diff changeset
102 -- been overridden as required, and that nonabstract subprograms have not
kono
parents:
diff changeset
103 -- been incorrectly overridden with an abstract subprogram.
kono
parents:
diff changeset
104
kono
parents:
diff changeset
105 procedure Check_Aliased_Component_Types (T : Entity_Id);
kono
parents:
diff changeset
106 -- Given an array type or record type T, check that if the type is
kono
parents:
diff changeset
107 -- nonlimited, then the nominal subtype of any components of T that
kono
parents:
diff changeset
108 -- have discriminants must be constrained.
kono
parents:
diff changeset
109
kono
parents:
diff changeset
110 procedure Check_Completion (Body_Id : Node_Id := Empty);
kono
parents:
diff changeset
111 -- At the end of a declarative part, verify that all entities that require
kono
parents:
diff changeset
112 -- completion have received one. If Body_Id is absent, the error indicating
kono
parents:
diff changeset
113 -- a missing completion is placed on the declaration that needs completion.
kono
parents:
diff changeset
114 -- If Body_Id is present, it is the defining identifier of a package body,
kono
parents:
diff changeset
115 -- and errors are posted on that node, rather than on the declarations that
kono
parents:
diff changeset
116 -- require completion in the package declaration.
kono
parents:
diff changeset
117
kono
parents:
diff changeset
118 procedure Check_CPP_Type_Has_No_Defaults (T : Entity_Id);
kono
parents:
diff changeset
119 -- Check that components of imported CPP type T do not have default
kono
parents:
diff changeset
120 -- expressions because the constructor (if any) is on the C++ side.
kono
parents:
diff changeset
121
kono
parents:
diff changeset
122 procedure Derive_Subprogram
kono
parents:
diff changeset
123 (New_Subp : out Entity_Id;
kono
parents:
diff changeset
124 Parent_Subp : Entity_Id;
kono
parents:
diff changeset
125 Derived_Type : Entity_Id;
kono
parents:
diff changeset
126 Parent_Type : Entity_Id;
kono
parents:
diff changeset
127 Actual_Subp : Entity_Id := Empty);
kono
parents:
diff changeset
128 -- Derive the subprogram Parent_Subp from Parent_Type, and replace the
kono
parents:
diff changeset
129 -- subsidiary subtypes with the derived type to build the specification of
kono
parents:
diff changeset
130 -- the inherited subprogram (returned in New_Subp). For tagged types, the
kono
parents:
diff changeset
131 -- derived subprogram is aliased to that of the actual (in the case where
kono
parents:
diff changeset
132 -- Actual_Subp is nonempty) rather than to the corresponding subprogram of
kono
parents:
diff changeset
133 -- the parent type.
kono
parents:
diff changeset
134
kono
parents:
diff changeset
135 procedure Derive_Subprograms
kono
parents:
diff changeset
136 (Parent_Type : Entity_Id;
kono
parents:
diff changeset
137 Derived_Type : Entity_Id;
kono
parents:
diff changeset
138 Generic_Actual : Entity_Id := Empty);
kono
parents:
diff changeset
139 -- To complete type derivation, collect/retrieve the primitive operations
kono
parents:
diff changeset
140 -- of the parent type, and replace the subsidiary subtypes with the derived
kono
parents:
diff changeset
141 -- type, to build the specs of the inherited ops. For generic actuals, the
kono
parents:
diff changeset
142 -- mapping of the primitive operations to those of the parent type is also
kono
parents:
diff changeset
143 -- done by rederiving the operations within the instance. For tagged types,
kono
parents:
diff changeset
144 -- the derived subprograms are aliased to those of the actual, not those of
kono
parents:
diff changeset
145 -- the ancestor.
kono
parents:
diff changeset
146 --
kono
parents:
diff changeset
147 -- Note: one might expect this to be private to the package body, but there
kono
parents:
diff changeset
148 -- is one rather unusual usage in package Exp_Dist.
kono
parents:
diff changeset
149
kono
parents:
diff changeset
150 function Find_Hidden_Interface
kono
parents:
diff changeset
151 (Src : Elist_Id;
kono
parents:
diff changeset
152 Dest : Elist_Id) return Entity_Id;
kono
parents:
diff changeset
153 -- Ada 2005: Determine whether the interfaces in list Src are all present
kono
parents:
diff changeset
154 -- in the list Dest. Return the first differing interface, or Empty
kono
parents:
diff changeset
155 -- otherwise.
kono
parents:
diff changeset
156
kono
parents:
diff changeset
157 function Find_Type_Of_Subtype_Indic (S : Node_Id) return Entity_Id;
kono
parents:
diff changeset
158 -- Given a subtype indication S (which is really an N_Subtype_Indication
kono
parents:
diff changeset
159 -- node or a plain N_Identifier), find the type of the subtype mark.
kono
parents:
diff changeset
160
kono
parents:
diff changeset
161 function Find_Type_Name (N : Node_Id) return Entity_Id;
kono
parents:
diff changeset
162 -- Enter the identifier in a type definition, or find the entity already
kono
parents:
diff changeset
163 -- declared, in the case of the full declaration of an incomplete or
kono
parents:
diff changeset
164 -- private type. If the previous declaration is tagged then the class-wide
kono
parents:
diff changeset
165 -- entity is propagated to the identifier to prevent multiple incompatible
kono
parents:
diff changeset
166 -- class-wide types that may be created for self-referential anonymous
kono
parents:
diff changeset
167 -- access components.
kono
parents:
diff changeset
168
kono
parents:
diff changeset
169 function Get_Discriminant_Value
kono
parents:
diff changeset
170 (Discriminant : Entity_Id;
kono
parents:
diff changeset
171 Typ_For_Constraint : Entity_Id;
kono
parents:
diff changeset
172 Constraint : Elist_Id) return Node_Id;
kono
parents:
diff changeset
173 -- ??? MORE DOCUMENTATION
kono
parents:
diff changeset
174 -- Given a discriminant somewhere in the Typ_For_Constraint tree and a
kono
parents:
diff changeset
175 -- Constraint, return the value of that discriminant.
kono
parents:
diff changeset
176
kono
parents:
diff changeset
177 function Is_Null_Extension (T : Entity_Id) return Boolean;
kono
parents:
diff changeset
178 -- Returns True if the tagged type T has an N_Full_Type_Declaration that
kono
parents:
diff changeset
179 -- is a null extension, meaning that it has an extension part without any
kono
parents:
diff changeset
180 -- components and does not have a known discriminant part.
kono
parents:
diff changeset
181
kono
parents:
diff changeset
182 function Is_Visible_Component
kono
parents:
diff changeset
183 (C : Entity_Id;
kono
parents:
diff changeset
184 N : Node_Id := Empty) return Boolean;
kono
parents:
diff changeset
185 -- Determines if a record component C is visible in the present context.
kono
parents:
diff changeset
186 -- Note that even though component C could appear in the entity chain of a
kono
parents:
diff changeset
187 -- record type, C may not be visible in the current context. For instance,
kono
parents:
diff changeset
188 -- C may be a component inherited in the full view of a private extension
kono
parents:
diff changeset
189 -- which is not visible in the current context.
kono
parents:
diff changeset
190 --
kono
parents:
diff changeset
191 -- If present, N is the selected component of which C is the selector. If
kono
parents:
diff changeset
192 -- the prefix of N is a type conversion inserted for a discriminant check,
kono
parents:
diff changeset
193 -- C is automatically visible.
kono
parents:
diff changeset
194
kono
parents:
diff changeset
195 procedure Make_Index
kono
parents:
diff changeset
196 (N : Node_Id;
kono
parents:
diff changeset
197 Related_Nod : Node_Id;
kono
parents:
diff changeset
198 Related_Id : Entity_Id := Empty;
kono
parents:
diff changeset
199 Suffix_Index : Nat := 1;
kono
parents:
diff changeset
200 In_Iter_Schm : Boolean := False);
kono
parents:
diff changeset
201 -- Process an index that is given in an array declaration, an entry
kono
parents:
diff changeset
202 -- family declaration or a loop iteration. The index is given by an index
kono
parents:
diff changeset
203 -- declaration (a 'box'), or by a discrete range. The later can be the name
kono
parents:
diff changeset
204 -- of a discrete type, or a subtype indication.
kono
parents:
diff changeset
205 --
kono
parents:
diff changeset
206 -- Related_Nod is the node where the potential generated implicit types
kono
parents:
diff changeset
207 -- will be inserted. The next last parameters are used for creating the
kono
parents:
diff changeset
208 -- name. In_Iter_Schm is True if Make_Index is called on the discrete
kono
parents:
diff changeset
209 -- subtype definition in an iteration scheme.
kono
parents:
diff changeset
210
kono
parents:
diff changeset
211 procedure Make_Class_Wide_Type (T : Entity_Id);
kono
parents:
diff changeset
212 -- A Class_Wide_Type is created for each tagged type definition. The
kono
parents:
diff changeset
213 -- attributes of a class-wide type are inherited from those of the type T.
kono
parents:
diff changeset
214 -- If T is introduced by a private declaration, the corresponding class
kono
parents:
diff changeset
215 -- wide type is created at the same time, and therefore there is a private
kono
parents:
diff changeset
216 -- and a full declaration for the class-wide type as well.
kono
parents:
diff changeset
217
kono
parents:
diff changeset
218 function OK_For_Limited_Init_In_05
kono
parents:
diff changeset
219 (Typ : Entity_Id;
kono
parents:
diff changeset
220 Exp : Node_Id) return Boolean;
kono
parents:
diff changeset
221 -- Presuming Exp is an expression of an inherently limited type Typ,
kono
parents:
diff changeset
222 -- returns True if the expression is allowed in an initialization context
kono
parents:
diff changeset
223 -- by the rules of Ada 2005. We use the rule in RM-7.5(2.1/2), "...it is an
kono
parents:
diff changeset
224 -- aggregate, a function_call, or a parenthesized expression or qualified
kono
parents:
diff changeset
225 -- expression whose operand is permitted...". Note that in Ada 95 mode,
kono
parents:
diff changeset
226 -- we sometimes wish to give warnings based on whether the program _would_
kono
parents:
diff changeset
227 -- be legal in Ada 2005. Note that Exp must already have been resolved,
kono
parents:
diff changeset
228 -- so we can know whether it's a function call (as opposed to an indexed
kono
parents:
diff changeset
229 -- component, for example). In the case where Typ is a limited interface's
kono
parents:
diff changeset
230 -- class-wide type, then the expression is allowed to be of any kind if its
kono
parents:
diff changeset
231 -- type is a nonlimited descendant of the interface.
kono
parents:
diff changeset
232
kono
parents:
diff changeset
233 function OK_For_Limited_Init
kono
parents:
diff changeset
234 (Typ : Entity_Id;
kono
parents:
diff changeset
235 Exp : Node_Id) return Boolean;
kono
parents:
diff changeset
236 -- Always False in Ada 95 mode. Equivalent to OK_For_Limited_Init_In_05 in
kono
parents:
diff changeset
237 -- Ada 2005 mode.
kono
parents:
diff changeset
238
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
239 procedure Preanalyze_Assert_Expression (N : Node_Id; T : Entity_Id);
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
240 -- Wrapper on Preanalyze_Spec_Expression for assertion expressions, so that
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
241 -- In_Assertion_Expr can be properly adjusted.
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
242
111
kono
parents:
diff changeset
243 procedure Preanalyze_Spec_Expression (N : Node_Id; T : Entity_Id);
kono
parents:
diff changeset
244 -- Default and per object expressions do not freeze their components, and
kono
parents:
diff changeset
245 -- must be analyzed and resolved accordingly. The analysis is done by
kono
parents:
diff changeset
246 -- calling the Preanalyze_And_Resolve routine and setting the global
kono
parents:
diff changeset
247 -- In_Default_Expression flag. See the documentation section entitled
kono
parents:
diff changeset
248 -- "Handling of Default and Per-Object Expressions" in sem.ads for full
kono
parents:
diff changeset
249 -- details. N is the expression to be analyzed, T is the expected type.
kono
parents:
diff changeset
250 -- This mechanism is also used for aspect specifications that have an
kono
parents:
diff changeset
251 -- expression parameter that needs similar preanalysis.
kono
parents:
diff changeset
252
kono
parents:
diff changeset
253 procedure Process_Full_View (N : Node_Id; Full_T, Priv_T : Entity_Id);
kono
parents:
diff changeset
254 -- Process some semantic actions when the full view of a private type is
kono
parents:
diff changeset
255 -- encountered and analyzed. The first action is to create the full views
kono
parents:
diff changeset
256 -- of the dependant private subtypes. The second action is to recopy the
kono
parents:
diff changeset
257 -- primitive operations of the private view (in the tagged case).
kono
parents:
diff changeset
258 -- N is the N_Full_Type_Declaration node.
kono
parents:
diff changeset
259 --
kono
parents:
diff changeset
260 -- Full_T is the full view of the type whose full declaration is in N.
kono
parents:
diff changeset
261 --
kono
parents:
diff changeset
262 -- Priv_T is the private view of the type whose full declaration is in N.
kono
parents:
diff changeset
263
kono
parents:
diff changeset
264 procedure Process_Range_Expr_In_Decl
kono
parents:
diff changeset
265 (R : Node_Id;
kono
parents:
diff changeset
266 T : Entity_Id;
kono
parents:
diff changeset
267 Subtyp : Entity_Id := Empty;
kono
parents:
diff changeset
268 Check_List : List_Id := Empty_List;
kono
parents:
diff changeset
269 R_Check_Off : Boolean := False;
kono
parents:
diff changeset
270 In_Iter_Schm : Boolean := False);
kono
parents:
diff changeset
271 -- Process a range expression that appears in a declaration context. The
kono
parents:
diff changeset
272 -- range is analyzed and resolved with the base type of the given type, and
kono
parents:
diff changeset
273 -- an appropriate check for expressions in non-static contexts made on the
kono
parents:
diff changeset
274 -- bounds. R is analyzed and resolved using T, so the caller should if
kono
parents:
diff changeset
275 -- necessary link R into the tree before the call, and in particular in the
kono
parents:
diff changeset
276 -- case of a subtype declaration, it is appropriate to set the parent
kono
parents:
diff changeset
277 -- pointer of R so that the types get properly frozen. Check_List is used
kono
parents:
diff changeset
278 -- when the subprogram is called from Build_Record_Init_Proc and is used to
kono
parents:
diff changeset
279 -- return a set of constraint checking statements generated by the Checks
kono
parents:
diff changeset
280 -- package. R_Check_Off is set to True when the call to Range_Check is to
kono
parents:
diff changeset
281 -- be skipped. In_Iter_Schm is True if Process_Range_Expr_In_Decl is called
kono
parents:
diff changeset
282 -- on the discrete subtype definition in an iteration scheme.
kono
parents:
diff changeset
283 --
kono
parents:
diff changeset
284 -- If Subtyp is given, then the range is for the named subtype Subtyp, and
kono
parents:
diff changeset
285 -- in this case the bounds are captured if necessary using this name.
kono
parents:
diff changeset
286
kono
parents:
diff changeset
287 function Process_Subtype
kono
parents:
diff changeset
288 (S : Node_Id;
kono
parents:
diff changeset
289 Related_Nod : Node_Id;
kono
parents:
diff changeset
290 Related_Id : Entity_Id := Empty;
kono
parents:
diff changeset
291 Suffix : Character := ' ') return Entity_Id;
kono
parents:
diff changeset
292 -- Process a subtype indication S and return corresponding entity.
kono
parents:
diff changeset
293 -- Related_Nod is the node where the potential generated implicit types
kono
parents:
diff changeset
294 -- will be inserted. The Related_Id and Suffix parameters are used to
kono
parents:
diff changeset
295 -- build the associated Implicit type name.
kono
parents:
diff changeset
296
kono
parents:
diff changeset
297 procedure Process_Discriminants
kono
parents:
diff changeset
298 (N : Node_Id;
kono
parents:
diff changeset
299 Prev : Entity_Id := Empty);
kono
parents:
diff changeset
300 -- Process the discriminants contained in an N_Full_Type_Declaration or
kono
parents:
diff changeset
301 -- N_Incomplete_Type_Decl node N. If the declaration is a completion, Prev
kono
parents:
diff changeset
302 -- is entity on the partial view, on which references are posted. However,
kono
parents:
diff changeset
303 -- note that Process_Discriminants is called for a completion only if
kono
parents:
diff changeset
304 -- partial view had no discriminants (else we just check conformance
kono
parents:
diff changeset
305 -- between the two views and do not call Process_Discriminants again
kono
parents:
diff changeset
306 -- for the completion).
kono
parents:
diff changeset
307
kono
parents:
diff changeset
308 function Replace_Anonymous_Access_To_Protected_Subprogram
kono
parents:
diff changeset
309 (N : Node_Id) return Entity_Id;
kono
parents:
diff changeset
310 -- Ada 2005 (AI-254): Create and decorate an internal full type declaration
kono
parents:
diff changeset
311 -- for an anonymous access to protected subprogram. For a record component
kono
parents:
diff changeset
312 -- declaration, the type is created in the enclosing scope, for an array
kono
parents:
diff changeset
313 -- type declaration or an object declaration it is simply placed ahead of
kono
parents:
diff changeset
314 -- this declaration.
kono
parents:
diff changeset
315
kono
parents:
diff changeset
316 procedure Set_Completion_Referenced (E : Entity_Id);
kono
parents:
diff changeset
317 -- If E is the completion of a private or incomplete type declaration,
kono
parents:
diff changeset
318 -- or the completion of a deferred constant declaration, mark the entity
kono
parents:
diff changeset
319 -- as referenced. Warnings on unused entities, if needed, go on the
kono
parents:
diff changeset
320 -- partial view.
kono
parents:
diff changeset
321
kono
parents:
diff changeset
322 end Sem_Ch3;