1 /****************************************************************************
3 * GNAT COMPILER COMPONENTS *
9 * Copyright (C) 1992-2020, Free Software Foundation, Inc. *
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. *
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. *
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/>. *
27 * GNAT was originally developed by the GNAT team at New York University. *
28 * Extensive contributions were provided by Ada Core Technologies Inc. *
30 ****************************************************************************/
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:
37 "WARNING: There is a matching C declaration of this <entity_kind> in fe.h"
39 where <entity_kind> is either "subprogram" or "variable" or "type".
41 WARNING: functions taking String_Pointer parameters must abide by the rule
42 documented alongside the definition of String_Pointer in types.h. */
50 #define Serious_Errors_Detected atree__serious_errors_detected
52 extern Nat Serious_Errors_Detected
;
56 #define Compiler_Abort comperr__compiler_abort
58 extern int Compiler_Abort (String_Pointer
, String_Pointer
, Boolean
) ATTRIBUTE_NORETURN
;
62 #define Debug_Flag_Dot_KK debug__debug_flag_dot_kk
63 #define Debug_Flag_Dot_R debug__debug_flag_dot_r
64 #define Debug_Flag_NN debug__debug_flag_nn
66 extern Boolean Debug_Flag_Dot_KK
;
67 extern Boolean Debug_Flag_Dot_R
;
68 extern Boolean Debug_Flag_NN
;
72 #define Set_Alignment einfo__set_alignment
73 #define Set_Component_Bit_Offset einfo__set_component_bit_offset
74 #define Set_Component_Size einfo__set_component_size
75 #define Set_Esize einfo__set_esize
76 #define Set_Mechanism einfo__set_mechanism
77 #define Set_Normalized_First_Bit einfo__set_normalized_first_bit
78 #define Set_Normalized_Position einfo__set_normalized_position
79 #define Set_RM_Size einfo__set_rm_size
81 extern void Set_Alignment (Entity_Id
, Uint
);
82 extern void Set_Component_Bit_Offset (Entity_Id
, Uint
);
83 extern void Set_Component_Size (Entity_Id
, Uint
);
84 extern void Set_Esize (Entity_Id
, Uint
);
85 extern void Set_Mechanism (Entity_Id
, Mechanism_Type
);
86 extern void Set_Normalized_First_Bit (Entity_Id
, Uint
);
87 extern void Set_Normalized_Position (Entity_Id
, Uint
);
88 extern void Set_RM_Size (Entity_Id
, Uint
);
90 #define Is_Entity_Name einfo__is_entity_name
92 extern Boolean
Is_Entity_Name (Node_Id
);
94 #define Get_Attribute_Definition_Clause einfo__get_attribute_definition_clause
96 extern Node_Id
Get_Attribute_Definition_Clause (Entity_Id
, unsigned char);
100 #define Error_Msg_N errout__error_msg_n
101 #define Error_Msg_NE errout__error_msg_ne
102 #define Set_Identifier_Casing errout__set_identifier_casing
104 extern void Error_Msg_N (String_Pointer
, Node_Id
);
105 extern void Error_Msg_NE (String_Pointer
, Node_Id
, Entity_Id
);
106 extern void Set_Identifier_Casing (Char
*, const Char
*);
110 #define Error_Msg_Uint_1 err_vars__error_msg_uint_1
111 #define Error_Msg_Uint_2 err_vars__error_msg_uint_2
113 extern Uint Error_Msg_Uint_1
;
114 extern Uint Error_Msg_Uint_2
;
118 #define Get_Local_Raise_Call_Entity exp_ch11__get_local_raise_call_entity
119 #define Get_RT_Exception_Entity exp_ch11__get_rt_exception_entity
120 #define Get_RT_Exception_Name exp_ch11__get_rt_exception_name
121 #define Warn_If_No_Local_Raise exp_ch11__warn_if_no_local_raise
123 extern Entity_Id
Get_Local_Raise_Call_Entity (void);
124 extern Entity_Id
Get_RT_Exception_Entity (int);
125 extern void Get_RT_Exception_Name (int);
126 extern void Warn_If_No_Local_Raise (int);
130 #define Asm_Input_Constraint exp_code__asm_input_constraint
131 #define Asm_Input_Value exp_code__asm_input_value
132 #define Asm_Output_Constraint exp_code__asm_output_constraint
133 #define Asm_Output_Variable exp_code__asm_output_variable
134 #define Asm_Template exp_code__asm_template
135 #define Clobber_Get_Next exp_code__clobber_get_next
136 #define Clobber_Setup exp_code__clobber_setup
137 #define Is_Asm_Volatile exp_code__is_asm_volatile
138 #define Next_Asm_Input exp_code__next_asm_input
139 #define Next_Asm_Output exp_code__next_asm_output
140 #define Setup_Asm_Inputs exp_code__setup_asm_inputs
141 #define Setup_Asm_Outputs exp_code__setup_asm_outputs
143 extern Node_Id
Asm_Input_Constraint (void);
144 extern Node_Id
Asm_Input_Value (void);
145 extern Node_Id
Asm_Output_Constraint (void);
146 extern Node_Id
Asm_Output_Variable (void);
147 extern Node_Id
Asm_Template (Node_Id
);
148 extern char *Clobber_Get_Next (void);
149 extern void Clobber_Setup (Node_Id
);
150 extern Boolean
Is_Asm_Volatile (Node_Id
);
151 extern void Next_Asm_Input (void);
152 extern void Next_Asm_Output (void);
153 extern void Setup_Asm_Inputs (Node_Id
);
154 extern void Setup_Asm_Outputs (Node_Id
);
158 #define Get_Encoded_Name exp_dbug__get_encoded_name
159 #define Get_External_Name exp_dbug__get_external_name
160 #define Get_Variant_Encoding exp_dbug__get_variant_encoding
162 extern void Get_Encoded_Name (Entity_Id
);
163 extern void Get_External_Name (Entity_Id
, Boolean
, String_Pointer
);
164 extern void Get_Variant_Encoding (Entity_Id
);
168 #define Is_Init_Proc exp_tss__is_init_proc
170 extern Boolean
Is_Init_Proc (Entity_Id
);
174 #define Is_Fully_Repped_Tagged_Type exp_util__is_fully_repped_tagged_type
175 #define Find_Interface_Tag exp_util__find_interface_tag
177 extern Boolean
Is_Fully_Repped_Tagged_Type (Entity_Id
);
178 extern Entity_Id
Find_Interface_Tag (Entity_Id
, Entity_Id
);
182 #define Cunit lib__cunit
183 #define Ident_String lib__ident_string
184 #define In_Extended_Main_Code_Unit lib__in_extended_main_code_unit
186 extern Node_Id
Cunit (Unit_Number_Type
);
187 extern Node_Id
Ident_String (Unit_Number_Type
);
188 extern Boolean
In_Extended_Main_Code_Unit (Entity_Id
);
192 #define Ada_Version opt__ada_version
193 #define Back_End_Inlining opt__back_end_inlining
194 #define Debug_Generated_Code opt__debug_generated_code
195 #define Enable_128bit_Types opt__enable_128bit_types
196 #define Exception_Extra_Info opt__exception_extra_info
197 #define Exception_Locations_Suppressed opt__exception_locations_suppressed
198 #define Exception_Mechanism opt__exception_mechanism
199 #define Generate_SCO_Instance_Table opt__generate_sco_instance_table
200 #define GNAT_Mode opt__gnat_mode
201 #define List_Representation_Info opt__list_representation_info
202 #define No_Strict_Aliasing_CP opt__no_strict_aliasing
203 #define Suppress_Checks opt__suppress_checks
206 Ada_83
, Ada_95
, Ada_2005
, Ada_2012
, Ada_2020
210 Front_End_SJLJ
, Back_End_ZCX
, Back_End_SJLJ
211 } Exception_Mechanism_Type
;
213 extern Ada_Version_Type Ada_Version
;
214 extern Boolean Back_End_Inlining
;
215 extern Boolean Debug_Generated_Code
;
216 extern Boolean Enable_128bit_Types
;
217 extern Boolean Exception_Extra_Info
;
218 extern Boolean Exception_Locations_Suppressed
;
219 extern Exception_Mechanism_Type Exception_Mechanism
;
220 extern Boolean Generate_SCO_Instance_Table
;
221 extern Boolean GNAT_Mode
;
222 extern Int List_Representation_Info
;
223 extern Boolean No_Strict_Aliasing_CP
;
224 extern Boolean Suppress_Checks
;
226 #define ZCX_Exceptions opt__zcx_exceptions
227 #define SJLJ_Exceptions opt__sjlj_exceptions
228 #define Front_End_Exceptions opt__front_end_exceptions
229 #define Back_End_Exceptions opt__back_end_exceptions
231 extern Boolean
ZCX_Exceptions (void);
232 extern Boolean
SJLJ_Exceptions (void);
233 extern Boolean
Front_End_Exceptions (void);
234 extern Boolean
Back_End_Exceptions (void);
238 #define Check_Elaboration_Code_Allowed \
239 restrict__check_elaboration_code_allowed
240 #define Check_Implicit_Dynamic_Code_Allowed \
241 restrict__check_implicit_dynamic_code_allowed
242 #define Check_No_Implicit_Heap_Alloc \
243 restrict__check_no_implicit_heap_alloc
244 #define Check_No_Implicit_Protected_Alloc \
245 restrict__check_no_implicit_protected_alloc
246 #define Check_No_Implicit_Task_Alloc \
247 restrict__check_no_implicit_task_alloc
248 #define No_Exception_Handlers_Set \
249 restrict__no_exception_handlers_set
251 extern void Check_Elaboration_Code_Allowed (Node_Id
);
252 extern void Check_Implicit_Dynamic_Code_Allowed (Node_Id
);
253 extern void Check_No_Implicit_Heap_Alloc (Node_Id
);
254 extern void Check_No_Implicit_Protected_Alloc (Node_Id
);
255 extern void Check_No_Implicit_Task_Alloc (Node_Id
);
256 extern Boolean
No_Exception_Handlers_Set (void);
260 #define Is_Single_Aggregate sem_aggr__is_single_aggregate
262 extern Boolean
Is_Single_Aggregate (Node_Id
);
266 #define Ancestor_Subtype sem_aux__ancestor_subtype
267 #define Constant_Value sem_aux__constant_value
268 #define First_Discriminant sem_aux__first_discriminant
269 #define First_Stored_Discriminant sem_aux__first_stored_discriminant
270 #define First_Subtype sem_aux__first_subtype
271 #define Is_By_Reference_Type sem_aux__is_by_reference_type
272 #define Is_Derived_Type sem_aux__is_derived_type
274 extern Entity_Id
Ancestor_Subtype (Entity_Id
);
275 extern Node_Id
Constant_Value (Entity_Id
);
276 extern Entity_Id
First_Discriminant (Entity_Id
);
277 extern Entity_Id
First_Stored_Discriminant (Entity_Id
);
278 extern Entity_Id
First_Subtype (Entity_Id
);
279 extern Boolean
Is_By_Reference_Type (Entity_Id
);
280 extern Boolean
Is_Derived_Type (Entity_Id
);
284 #define Compile_Time_Known_Value sem_eval__compile_time_known_value
286 extern Boolean
Compile_Time_Known_Value (Node_Id
);
290 #define Defining_Entity sem_util__defining_entity
291 #define First_Actual sem_util__first_actual
292 #define Is_Variable_Size_Record sem_util__is_variable_size_record
293 #define Next_Actual sem_util__next_actual
294 #define Requires_Transient_Scope sem_util__requires_transient_scope
296 extern Entity_Id
Defining_Entity (Node_Id
);
297 extern Node_Id
First_Actual (Node_Id
);
298 extern Boolean
Is_Variable_Size_Record (Entity_Id Id
);
299 extern Node_Id
Next_Actual (Node_Id
);
300 extern Boolean
Requires_Transient_Scope (Entity_Id
);
304 #define End_Location sinfo__end_location
305 #define Set_Has_No_Elaboration_Code sinfo__set_has_no_elaboration_code
306 #define Set_Present_Expr sinfo__set_present_expr
308 extern Source_Ptr
End_Location (Node_Id
);
309 extern void Set_Has_No_Elaboration_Code (Node_Id
, Boolean
);
310 extern void Set_Present_Expr (Node_Id
, Uint
);
314 #define Debug_Source_Name sinput__debug_source_name
315 #define Get_Column_Number sinput__get_column_number
316 #define Get_Logical_Line_Number sinput__get_logical_line_number
317 #define Get_Source_File_Index sinput__get_source_file_index
319 extern File_Name_Type
Debug_Source_Name (Source_File_Index
);
320 extern Column_Number_Type
Get_Column_Number (Source_Ptr
);
321 extern Line_Number_Type
Get_Logical_Line_Number (Source_Ptr
);
322 extern Source_File_Index
Get_Source_File_Index (Source_Ptr
);
326 #define Machine_Overflows_On_Target \
327 targparm__machine_overflows_on_target
328 #define Signed_Zeros_On_Target \
329 targparm__signed_zeros_on_target
330 #define Stack_Check_Limits_On_Target \
331 targparm__stack_check_limits_on_target
332 #define Stack_Check_Probes_On_Target \
333 targparm__stack_check_probes_on_target
335 extern Boolean Machine_Overflows_On_Target
;
336 extern Boolean Signed_Zeros_On_Target
;
337 extern Boolean Stack_Check_Limits_On_Target
;
338 extern Boolean Stack_Check_Probes_On_Target
;
342 #define Warn_On_Questionable_Layout warnsw__warn_on_questionable_layout
344 extern Boolean Warn_On_Questionable_Layout
;