Add preliminary support for 128-bit integer types
[gcc.git] / gcc / ada / fe.h
1 /****************************************************************************
2 * *
3 * GNAT COMPILER COMPONENTS *
4 * *
5 * FE *
6 * *
7 * C Header File *
8 * *
9 * Copyright (C) 1992-2020, Free Software Foundation, Inc. *
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
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".
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
50 #define Serious_Errors_Detected atree__serious_errors_detected
51
52 extern Nat Serious_Errors_Detected;
53
54 /* comperr: */
55
56 #define Compiler_Abort comperr__compiler_abort
57
58 extern int Compiler_Abort (String_Pointer, String_Pointer, Boolean) ATTRIBUTE_NORETURN;
59
60 /* debug: */
61
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
65
66 extern Boolean Debug_Flag_Dot_KK;
67 extern Boolean Debug_Flag_Dot_R;
68 extern Boolean Debug_Flag_NN;
69
70 /* einfo: */
71
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
80
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);
89
90 #define Is_Entity_Name einfo__is_entity_name
91
92 extern Boolean Is_Entity_Name (Node_Id);
93
94 #define Get_Attribute_Definition_Clause einfo__get_attribute_definition_clause
95
96 extern Node_Id Get_Attribute_Definition_Clause (Entity_Id, unsigned char);
97
98 /* errout: */
99
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
103
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 *);
107
108 /* err_vars: */
109
110 #define Error_Msg_Uint_1 err_vars__error_msg_uint_1
111 #define Error_Msg_Uint_2 err_vars__error_msg_uint_2
112
113 extern Uint Error_Msg_Uint_1;
114 extern Uint Error_Msg_Uint_2;
115
116 /* exp_ch11: */
117
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
122
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);
127
128 /* exp_code: */
129
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
142
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);
155
156 /* exp_dbug: */
157
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
161
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);
165
166 /* exp_tss: */
167
168 #define Is_Init_Proc exp_tss__is_init_proc
169
170 extern Boolean Is_Init_Proc (Entity_Id);
171
172 /* exp_util: */
173
174 #define Is_Fully_Repped_Tagged_Type exp_util__is_fully_repped_tagged_type
175 #define Find_Interface_Tag exp_util__find_interface_tag
176
177 extern Boolean Is_Fully_Repped_Tagged_Type (Entity_Id);
178 extern Entity_Id Find_Interface_Tag (Entity_Id, Entity_Id);
179
180 /* lib: */
181
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
185
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);
189
190 /* opt: */
191
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
204
205 typedef enum {
206 Ada_83, Ada_95, Ada_2005, Ada_2012, Ada_2020
207 } Ada_Version_Type;
208
209 typedef enum {
210 Front_End_SJLJ, Back_End_ZCX, Back_End_SJLJ
211 } Exception_Mechanism_Type;
212
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;
225
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
230
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);
235
236 /* restrict: */
237
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
250
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);
257
258 /* sem_aggr: */
259
260 #define Is_Single_Aggregate sem_aggr__is_single_aggregate
261
262 extern Boolean Is_Single_Aggregate (Node_Id);
263
264 /* sem_aux: */
265
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
273
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);
281
282 /* sem_eval: */
283
284 #define Compile_Time_Known_Value sem_eval__compile_time_known_value
285
286 extern Boolean Compile_Time_Known_Value (Node_Id);
287
288 /* sem_util: */
289
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
295
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);
301
302 /* sinfo: */
303
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
307
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);
311
312 /* sinput: */
313
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
318
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);
323
324 /* targparm: */
325
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
334
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;
339
340 /* warnsw: */
341
342 #define Warn_On_Questionable_Layout warnsw__warn_on_questionable_layout
343
344 extern Boolean Warn_On_Questionable_Layout;
345
346 #ifdef __cplusplus
347 }
348 #endif