111
|
1 /****************************************************************************
|
|
2 * *
|
|
3 * GNAT COMPILER COMPONENTS *
|
|
4 * *
|
|
5 * FE *
|
|
6 * *
|
|
7 * C Header File *
|
|
8 * *
|
145
|
9 * Copyright (C) 1992-2019, Free Software Foundation, Inc. *
|
111
|
10 * *
|
|
11 * GNAT is free software; you can redistribute it and/or modify it under *
|
|
12 * terms of the GNU General Public License as published by the Free Soft- *
|
|
13 * ware Foundation; either version 3, or (at your option) any later ver- *
|
|
14 * sion. GNAT is distributed in the hope that it will be useful, but WITH- *
|
|
15 * OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
|
|
16 * or FITNESS FOR A PARTICULAR PURPOSE. *
|
|
17 * *
|
|
18 * As a special exception under Section 7 of GPL version 3, you are granted *
|
|
19 * additional permissions described in the GCC Runtime Library Exception, *
|
|
20 * version 3.1, as published by the Free Software Foundation. *
|
|
21 * *
|
|
22 * You should have received a copy of the GNU General Public License and *
|
|
23 * a copy of the GCC Runtime Library Exception along with this program; *
|
|
24 * see the files COPYING3 and COPYING.RUNTIME respectively. If not, see *
|
|
25 * <http://www.gnu.org/licenses/>. *
|
|
26 * *
|
|
27 * GNAT was originally developed by the GNAT team at New York University. *
|
|
28 * Extensive contributions were provided by Ada Core Technologies Inc. *
|
|
29 * *
|
|
30 ****************************************************************************/
|
|
31
|
145
|
32 /* This is the C header that contains the declarations of Ada subprograms and
|
|
33 variables used by gigi and not declared in other C header files. It was
|
|
34 created manually from Ada specifications. The original Ada declarations
|
|
35 in these specifications must be marked with:
|
|
36
|
|
37 "WARNING: There is a matching C declaration of this <entity_kind> in fe.h"
|
|
38
|
|
39 where <entity_kind> is either "subprogram" or "variable" or "type".
|
111
|
40
|
|
41 WARNING: functions taking String_Pointer parameters must abide by the rule
|
|
42 documented alongside the definition of String_Pointer in types.h. */
|
|
43
|
|
44 #ifdef __cplusplus
|
|
45 extern "C" {
|
|
46 #endif
|
|
47
|
|
48 /* atree: */
|
|
49
|
145
|
50 #define Serious_Errors_Detected atree__serious_errors_detected
|
|
51
|
|
52 extern Nat Serious_Errors_Detected;
|
111
|
53
|
|
54 /* comperr: */
|
|
55
|
145
|
56 #define Compiler_Abort comperr__compiler_abort
|
111
|
57
|
145
|
58 extern int Compiler_Abort (String_Pointer, String_Pointer, Boolean) ATTRIBUTE_NORETURN;
|
111
|
59
|
|
60 /* debug: */
|
|
61
|
|
62 #define Debug_Flag_Dot_R debug__debug_flag_dot_r
|
|
63 #define Debug_Flag_NN debug__debug_flag_nn
|
145
|
64
|
111
|
65 extern Boolean Debug_Flag_Dot_R;
|
|
66 extern Boolean Debug_Flag_NN;
|
|
67
|
|
68 /* einfo: */
|
|
69
|
|
70 #define Set_Alignment einfo__set_alignment
|
|
71 #define Set_Component_Bit_Offset einfo__set_component_bit_offset
|
|
72 #define Set_Component_Size einfo__set_component_size
|
|
73 #define Set_Esize einfo__set_esize
|
|
74 #define Set_Mechanism einfo__set_mechanism
|
131
|
75 #define Set_Normalized_First_Bit einfo__set_normalized_first_bit
|
|
76 #define Set_Normalized_Position einfo__set_normalized_position
|
111
|
77 #define Set_RM_Size einfo__set_rm_size
|
|
78
|
|
79 extern void Set_Alignment (Entity_Id, Uint);
|
|
80 extern void Set_Component_Bit_Offset (Entity_Id, Uint);
|
|
81 extern void Set_Component_Size (Entity_Id, Uint);
|
|
82 extern void Set_Esize (Entity_Id, Uint);
|
|
83 extern void Set_Mechanism (Entity_Id, Mechanism_Type);
|
131
|
84 extern void Set_Normalized_First_Bit (Entity_Id, Uint);
|
|
85 extern void Set_Normalized_Position (Entity_Id, Uint);
|
111
|
86 extern void Set_RM_Size (Entity_Id, Uint);
|
|
87
|
145
|
88 #define Is_Entity_Name einfo__is_entity_name
|
|
89
|
111
|
90 extern Boolean Is_Entity_Name (Node_Id);
|
|
91
|
145
|
92 #define Get_Attribute_Definition_Clause einfo__get_attribute_definition_clause
|
|
93
|
131
|
94 extern Node_Id Get_Attribute_Definition_Clause (Entity_Id, unsigned char);
|
111
|
95
|
|
96 /* errout: */
|
|
97
|
145
|
98 #define Error_Msg_N errout__error_msg_n
|
|
99 #define Error_Msg_NE errout__error_msg_ne
|
|
100 #define Set_Identifier_Casing errout__set_identifier_casing
|
111
|
101
|
145
|
102 extern void Error_Msg_N (String_Pointer, Node_Id);
|
|
103 extern void Error_Msg_NE (String_Pointer, Node_Id, Entity_Id);
|
|
104 extern void Set_Identifier_Casing (Char *, const Char *);
|
111
|
105
|
|
106 /* err_vars: */
|
|
107
|
145
|
108 #define Error_Msg_Uint_1 err_vars__error_msg_uint_1
|
|
109 #define Error_Msg_Uint_2 err_vars__error_msg_uint_2
|
111
|
110
|
145
|
111 extern Uint Error_Msg_Uint_1;
|
|
112 extern Uint Error_Msg_Uint_2;
|
111
|
113
|
|
114 /* exp_ch11: */
|
|
115
|
145
|
116 #define Get_Local_Raise_Call_Entity exp_ch11__get_local_raise_call_entity
|
|
117 #define Get_RT_Exception_Entity exp_ch11__get_rt_exception_entity
|
|
118 #define Get_RT_Exception_Name exp_ch11__get_rt_exception_name
|
|
119 #define Warn_If_No_Local_Raise exp_ch11__warn_if_no_local_raise
|
111
|
120
|
145
|
121 extern Entity_Id Get_Local_Raise_Call_Entity (void);
|
|
122 extern Entity_Id Get_RT_Exception_Entity (int);
|
|
123 extern void Get_RT_Exception_Name (int);
|
|
124 extern void Warn_If_No_Local_Raise (int);
|
111
|
125
|
|
126 /* exp_code: */
|
|
127
|
145
|
128 #define Asm_Input_Constraint exp_code__asm_input_constraint
|
|
129 #define Asm_Input_Value exp_code__asm_input_value
|
|
130 #define Asm_Output_Constraint exp_code__asm_output_constraint
|
|
131 #define Asm_Output_Variable exp_code__asm_output_variable
|
|
132 #define Asm_Template exp_code__asm_template
|
|
133 #define Clobber_Get_Next exp_code__clobber_get_next
|
|
134 #define Clobber_Setup exp_code__clobber_setup
|
|
135 #define Is_Asm_Volatile exp_code__is_asm_volatile
|
|
136 #define Next_Asm_Input exp_code__next_asm_input
|
|
137 #define Next_Asm_Output exp_code__next_asm_output
|
|
138 #define Setup_Asm_Inputs exp_code__setup_asm_inputs
|
|
139 #define Setup_Asm_Outputs exp_code__setup_asm_outputs
|
111
|
140
|
|
141 extern Node_Id Asm_Input_Constraint (void);
|
|
142 extern Node_Id Asm_Input_Value (void);
|
|
143 extern Node_Id Asm_Output_Constraint (void);
|
|
144 extern Node_Id Asm_Output_Variable (void);
|
|
145 extern Node_Id Asm_Template (Node_Id);
|
|
146 extern char *Clobber_Get_Next (void);
|
|
147 extern void Clobber_Setup (Node_Id);
|
|
148 extern Boolean Is_Asm_Volatile (Node_Id);
|
|
149 extern void Next_Asm_Input (void);
|
|
150 extern void Next_Asm_Output (void);
|
|
151 extern void Setup_Asm_Inputs (Node_Id);
|
|
152 extern void Setup_Asm_Outputs (Node_Id);
|
|
153
|
|
154 /* exp_dbug: */
|
|
155
|
145
|
156 #define Get_Encoded_Name exp_dbug__get_encoded_name
|
|
157 #define Get_External_Name exp_dbug__get_external_name
|
|
158 #define Get_Variant_Encoding exp_dbug__get_variant_encoding
|
111
|
159
|
145
|
160 extern void Get_Encoded_Name (Entity_Id);
|
|
161 extern void Get_External_Name (Entity_Id, Boolean, String_Pointer);
|
|
162 extern void Get_Variant_Encoding (Entity_Id);
|
111
|
163
|
131
|
164 /* exp_tss: */
|
|
165
|
145
|
166 #define Is_Init_Proc exp_tss__is_init_proc
|
131
|
167
|
|
168 extern Boolean Is_Init_Proc (Entity_Id);
|
|
169
|
111
|
170 /* exp_util: */
|
|
171
|
145
|
172 #define Is_Fully_Repped_Tagged_Type exp_util__is_fully_repped_tagged_type
|
|
173 #define Find_Interface_Tag exp_util__find_interface_tag
|
111
|
174
|
|
175 extern Boolean Is_Fully_Repped_Tagged_Type (Entity_Id);
|
131
|
176 extern Entity_Id Find_Interface_Tag (Entity_Id, Entity_Id);
|
111
|
177
|
|
178 /* lib: */
|
|
179
|
|
180 #define Cunit lib__cunit
|
|
181 #define Ident_String lib__ident_string
|
|
182 #define In_Extended_Main_Code_Unit lib__in_extended_main_code_unit
|
|
183
|
|
184 extern Node_Id Cunit (Unit_Number_Type);
|
|
185 extern Node_Id Ident_String (Unit_Number_Type);
|
|
186 extern Boolean In_Extended_Main_Code_Unit (Entity_Id);
|
|
187
|
|
188 /* opt: */
|
|
189
|
145
|
190 #define Ada_Version opt__ada_version
|
|
191 #define Back_End_Inlining opt__back_end_inlining
|
|
192 #define Debug_Generated_Code opt__debug_generated_code
|
|
193 #define Exception_Extra_Info opt__exception_extra_info
|
|
194 #define Exception_Locations_Suppressed opt__exception_locations_suppressed
|
|
195 #define Exception_Mechanism opt__exception_mechanism
|
|
196 #define Generate_SCO_Instance_Table opt__generate_sco_instance_table
|
|
197 #define GNAT_Mode opt__gnat_mode
|
|
198 #define List_Representation_Info opt__list_representation_info
|
|
199 #define No_Strict_Aliasing_CP opt__no_strict_aliasing
|
|
200 #define Suppress_Checks opt__suppress_checks
|
|
201
|
|
202 typedef enum {
|
|
203 Ada_83, Ada_95, Ada_2005, Ada_2012, Ada_2020
|
|
204 } Ada_Version_Type;
|
111
|
205
|
|
206 typedef enum {
|
|
207 Front_End_SJLJ, Back_End_ZCX, Back_End_SJLJ
|
|
208 } Exception_Mechanism_Type;
|
|
209
|
145
|
210 extern Ada_Version_Type Ada_Version;
|
111
|
211 extern Boolean Back_End_Inlining;
|
145
|
212 extern Boolean Debug_Generated_Code;
|
111
|
213 extern Boolean Exception_Extra_Info;
|
|
214 extern Boolean Exception_Locations_Suppressed;
|
|
215 extern Exception_Mechanism_Type Exception_Mechanism;
|
|
216 extern Boolean Generate_SCO_Instance_Table;
|
|
217 extern Boolean GNAT_Mode;
|
|
218 extern Int List_Representation_Info;
|
|
219 extern Boolean No_Strict_Aliasing_CP;
|
145
|
220 extern Boolean Suppress_Checks;
|
111
|
221
|
145
|
222 #define ZCX_Exceptions opt__zcx_exceptions
|
|
223 #define SJLJ_Exceptions opt__sjlj_exceptions
|
|
224 #define Front_End_Exceptions opt__front_end_exceptions
|
|
225 #define Back_End_Exceptions opt__back_end_exceptions
|
111
|
226
|
145
|
227 extern Boolean ZCX_Exceptions (void);
|
|
228 extern Boolean SJLJ_Exceptions (void);
|
|
229 extern Boolean Front_End_Exceptions (void);
|
|
230 extern Boolean Back_End_Exceptions (void);
|
111
|
231
|
|
232 /* restrict: */
|
|
233
|
145
|
234 #define Check_Elaboration_Code_Allowed \
|
|
235 restrict__check_elaboration_code_allowed
|
|
236 #define Check_Implicit_Dynamic_Code_Allowed \
|
|
237 restrict__check_implicit_dynamic_code_allowed
|
|
238 #define Check_No_Implicit_Heap_Alloc \
|
|
239 restrict__check_no_implicit_heap_alloc
|
|
240 #define Check_No_Implicit_Protected_Alloc \
|
|
241 restrict__check_no_implicit_protected_alloc
|
|
242 #define Check_No_Implicit_Task_Alloc \
|
|
243 restrict__check_no_implicit_task_alloc
|
|
244 #define No_Exception_Handlers_Set \
|
|
245 restrict__no_exception_handlers_set
|
111
|
246
|
145
|
247 extern void Check_Elaboration_Code_Allowed (Node_Id);
|
|
248 extern void Check_Implicit_Dynamic_Code_Allowed (Node_Id);
|
|
249 extern void Check_No_Implicit_Heap_Alloc (Node_Id);
|
|
250 extern void Check_No_Implicit_Protected_Alloc (Node_Id);
|
|
251 extern void Check_No_Implicit_Task_Alloc (Node_Id);
|
|
252 extern Boolean No_Exception_Handlers_Set (void);
|
111
|
253
|
|
254 /* sem_aggr: */
|
|
255
|
145
|
256 #define Is_Others_Aggregate sem_aggr__is_others_aggregate
|
111
|
257
|
145
|
258 extern Boolean Is_Others_Aggregate (Node_Id);
|
111
|
259
|
|
260 /* sem_aux: */
|
|
261
|
145
|
262 #define Ancestor_Subtype sem_aux__ancestor_subtype
|
|
263 #define Constant_Value sem_aux__constant_value
|
|
264 #define First_Discriminant sem_aux__first_discriminant
|
|
265 #define First_Stored_Discriminant sem_aux__first_stored_discriminant
|
|
266 #define First_Subtype sem_aux__first_subtype
|
|
267 #define Is_By_Reference_Type sem_aux__is_by_reference_type
|
|
268 #define Is_Derived_Type sem_aux__is_derived_type
|
111
|
269
|
145
|
270 extern Entity_Id Ancestor_Subtype (Entity_Id);
|
|
271 extern Node_Id Constant_Value (Entity_Id);
|
|
272 extern Entity_Id First_Discriminant (Entity_Id);
|
|
273 extern Entity_Id First_Stored_Discriminant (Entity_Id);
|
|
274 extern Entity_Id First_Subtype (Entity_Id);
|
|
275 extern Boolean Is_By_Reference_Type (Entity_Id);
|
|
276 extern Boolean Is_Derived_Type (Entity_Id);
|
111
|
277
|
|
278 /* sem_eval: */
|
|
279
|
|
280 #define Compile_Time_Known_Value sem_eval__compile_time_known_value
|
|
281 #define Is_OK_Static_Expression sem_eval__is_ok_static_expression
|
|
282
|
145
|
283 extern Boolean Compile_Time_Known_Value (Node_Id);
|
|
284 extern Boolean Is_OK_Static_Expression (Node_Id);
|
111
|
285
|
|
286 /* sem_util: */
|
|
287
|
|
288 #define Defining_Entity sem_util__defining_entity
|
|
289 #define First_Actual sem_util__first_actual
|
145
|
290 #define Is_Variable_Size_Record sem_util__is_variable_size_record
|
111
|
291 #define Next_Actual sem_util__next_actual
|
|
292 #define Requires_Transient_Scope sem_util__requires_transient_scope
|
|
293
|
|
294 extern Entity_Id Defining_Entity (Node_Id);
|
|
295 extern Node_Id First_Actual (Node_Id);
|
145
|
296 extern Boolean Is_Variable_Size_Record (Entity_Id Id);
|
111
|
297 extern Node_Id Next_Actual (Node_Id);
|
131
|
298 extern Boolean Requires_Transient_Scope (Entity_Id);
|
111
|
299
|
|
300 /* sinfo: */
|
|
301
|
|
302 #define End_Location sinfo__end_location
|
145
|
303 #define Set_Has_No_Elaboration_Code sinfo__set_has_no_elaboration_code
|
111
|
304 #define Set_Present_Expr sinfo__set_present_expr
|
|
305
|
|
306 extern Source_Ptr End_Location (Node_Id);
|
|
307 extern void Set_Has_No_Elaboration_Code (Node_Id, Boolean);
|
|
308 extern void Set_Present_Expr (Node_Id, Uint);
|
|
309
|
145
|
310 /* sinput: */
|
|
311
|
|
312 #define Debug_Source_Name sinput__debug_source_name
|
|
313 #define Get_Column_Number sinput__get_column_number
|
|
314 #define Get_Logical_Line_Number sinput__get_logical_line_number
|
|
315 #define Get_Source_File_Index sinput__get_source_file_index
|
|
316
|
|
317 extern File_Name_Type Debug_Source_Name (Source_File_Index);
|
|
318 extern Column_Number_Type Get_Column_Number (Source_Ptr);
|
|
319 extern Line_Number_Type Get_Logical_Line_Number (Source_Ptr);
|
|
320 extern Source_File_Index Get_Source_File_Index (Source_Ptr);
|
|
321
|
111
|
322 /* targparm: */
|
|
323
|
145
|
324 #define Machine_Overflows_On_Target \
|
|
325 targparm__machine_overflows_on_target
|
|
326 #define Signed_Zeros_On_Target \
|
|
327 targparm__signed_zeros_on_target
|
|
328 #define Stack_Check_Limits_On_Target \
|
|
329 targparm__stack_check_limits_on_target
|
|
330 #define Stack_Check_Probes_On_Target \
|
|
331 targparm__stack_check_probes_on_target
|
111
|
332
|
|
333 extern Boolean Machine_Overflows_On_Target;
|
|
334 extern Boolean Signed_Zeros_On_Target;
|
145
|
335 extern Boolean Stack_Check_Limits_On_Target;
|
111
|
336 extern Boolean Stack_Check_Probes_On_Target;
|
|
337
|
|
338 /* warnsw: */
|
|
339
|
145
|
340 #define Warn_On_Questionable_Layout warnsw__warn_on_questionable_layout
|
111
|
341
|
|
342 extern Boolean Warn_On_Questionable_Layout;
|
|
343
|
|
344 #ifdef __cplusplus
|
|
345 }
|
|
346 #endif
|