From c7732bbe382b982e60eb9d606752d012159d1a18 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Thu, 12 Dec 2019 10:01:46 +0000 Subject: [PATCH] [Ada] Mark Ada subprograms and variables referenced from gigi 2019-12-12 Eric Botcazou gcc/ada/ * atree.ads, comperr.ads, debug.ads, einfo.ads, elists.ads, err_vars.ads, errout.ads, exp_ch11.ads, exp_code.ads, exp_dbug.ads, exp_tss.ads, exp_util.ads, lib.ads, namet.ads, nlists.ads, opt.ads, repinfo.ads, restrict.ads, scos.ads, sem_aggr.ads, sem_aux.ads, sem_eval.ads, sem_util.ads, sinfo.ads, sinput.ads, stringt.ads, targparm.ads, types.ads, urealp.ads warnsw.ads: Add WARNING line(s) in commentary. * atree.h, elists.h, namet.h, nlists.h, repinfo.h, scos.h, stringt.h, types.h, uintp.h, urealp.h: Tidy up. * fe.h: Likewise. Document WARNING mark. From-SVN: r279278 --- gcc/ada/ChangeLog | 13 +++ gcc/ada/atree.ads | 2 + gcc/ada/atree.h | 6 +- gcc/ada/comperr.ads | 2 + gcc/ada/debug.ads | 2 + gcc/ada/einfo.ads | 6 + gcc/ada/elists.ads | 3 + gcc/ada/elists.h | 6 +- gcc/ada/err_vars.ads | 2 + gcc/ada/errout.ads | 6 + gcc/ada/exp_ch11.ads | 8 ++ gcc/ada/exp_code.ads | 2 + gcc/ada/exp_dbug.ads | 6 + gcc/ada/exp_tss.ads | 2 + gcc/ada/exp_util.ads | 4 + gcc/ada/fe.h | 261 +++++++++++++++++++++++-------------------- gcc/ada/lib.ads | 4 + gcc/ada/namet.ads | 1 - gcc/ada/namet.h | 44 +------- gcc/ada/nlists.ads | 3 + gcc/ada/nlists.h | 6 +- gcc/ada/opt.ads | 22 ++++ gcc/ada/repinfo.ads | 3 + gcc/ada/repinfo.h | 4 +- gcc/ada/restrict.ads | 18 ++- gcc/ada/scos.ads | 6 +- gcc/ada/scos.h | 5 +- gcc/ada/sem_aggr.ads | 2 + gcc/ada/sem_aux.ads | 14 +++ gcc/ada/sem_eval.ads | 4 + gcc/ada/sem_util.ads | 30 +++-- gcc/ada/sinfo.ads | 4 + gcc/ada/sinput.ads | 8 ++ gcc/ada/stringt.ads | 3 + gcc/ada/stringt.h | 6 +- gcc/ada/targparm.ads | 8 ++ gcc/ada/types.ads | 2 +- gcc/ada/types.h | 8 +- gcc/ada/uintp.h | 5 +- gcc/ada/urealp.ads | 3 + gcc/ada/urealp.h | 5 +- gcc/ada/warnsw.ads | 2 + 42 files changed, 352 insertions(+), 199 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 8756dd7c7b7..4823313b3d0 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,16 @@ +2019-12-12 Eric Botcazou + + * atree.ads, comperr.ads, debug.ads, einfo.ads, elists.ads, + err_vars.ads, errout.ads, exp_ch11.ads, exp_code.ads, + exp_dbug.ads, exp_tss.ads, exp_util.ads, lib.ads, namet.ads, + nlists.ads, opt.ads, repinfo.ads, restrict.ads, scos.ads, + sem_aggr.ads, sem_aux.ads, sem_eval.ads, sem_util.ads, + sinfo.ads, sinput.ads, stringt.ads, targparm.ads, types.ads, + urealp.ads warnsw.ads: Add WARNING line(s) in commentary. + * atree.h, elists.h, namet.h, nlists.h, repinfo.h, scos.h, + stringt.h, types.h, uintp.h, urealp.h: Tidy up. + * fe.h: Likewise. Document WARNING mark. + 2019-12-12 Dmitriy Anisimkov * libgnat/g-comlin.ads (Get_Argument): New routine similar to diff --git a/gcc/ada/atree.ads b/gcc/ada/atree.ads index e6617e9d4be..491cde38b68 100644 --- a/gcc/ada/atree.ads +++ b/gcc/ada/atree.ads @@ -309,6 +309,8 @@ package Atree is -- switch -gnatQ is set. Initialized to zero at the start of compilation. -- Initialized for -gnatVa use, see comment above. + -- WARNING: There is a matching C declaration of this variable in fe.h + Total_Errors_Detected : Nat := 0; -- Number of errors detected so far. Includes count of serious errors and -- non-serious errors, so this value is always greater than or equal to the diff --git a/gcc/ada/atree.h b/gcc/ada/atree.h index 704ae9bda61..91875838fda 100644 --- a/gcc/ada/atree.h +++ b/gcc/ada/atree.h @@ -23,9 +23,9 @@ * * ****************************************************************************/ -/* This is the C header corresponding to the Ada package specification for - Atree. It also contains the implementations of inlined functions from the - package body for Atree. It was generated manually from atree.ads and +/* This is the C header that corresponds to the Ada package specification for + Atree. It also contains the implementation of inlined functions from the + package body for Atree. It was created manually from atree.ads and atree.adb and must be kept synchronized with changes in these files. Note that only routines for reading the tree are included, since the tree diff --git a/gcc/ada/comperr.ads b/gcc/ada/comperr.ads index d7704190bc5..2992e7dbca4 100644 --- a/gcc/ada/comperr.ads +++ b/gcc/ada/comperr.ads @@ -50,6 +50,8 @@ package Comperr is -- for a GCC abort and false for a front end exception (with a possible -- message stored in TSD.Current_Excep). + -- WARNING: There is a matching C declaration of this subprogram in fe.h + procedure Delete_SCIL_Files; -- Delete SCIL files associated with the main unit diff --git a/gcc/ada/debug.ads b/gcc/ada/debug.ads index 0ad6920ac41..2bbaae66b96 100644 --- a/gcc/ada/debug.ads +++ b/gcc/ada/debug.ads @@ -48,6 +48,8 @@ package Debug is -- is contained in the body of Debug rather than the spec, so that we don't -- have to recompile the world when a new debug flag is added. + -- WARNING: There is a matching C declaration of a few flags in fe.h + Debug_Flag_A : Boolean := False; Debug_Flag_B : Boolean := False; Debug_Flag_C : Boolean := False; diff --git a/gcc/ada/einfo.ads b/gcc/ada/einfo.ads index 536663142cc..c178e3ab8fe 100644 --- a/gcc/ada/einfo.ads +++ b/gcc/ada/einfo.ads @@ -7751,6 +7751,8 @@ package Einfo is -- Attribute Set Procedures -- ------------------------------ + -- WARNING: There is a matching C declaration of a few subprograms in fe.h + procedure Set_Abstract_States (Id : E; V : L); procedure Set_Accept_Address (Id : E; V : L); procedure Set_Access_Disp_Table (Id : E; V : L); @@ -8430,6 +8432,8 @@ package Einfo is -- value returned is the N_Attribute_Definition_Clause node, otherwise -- Empty is returned. + -- WARNING: There is a matching C declaration of this subprogram in fe.h + function Get_Pragma (E : Entity_Id; Id : Pragma_Id) return Node_Id; -- Searches the Rep_Item chain of entity E, for an instance of a pragma -- with the given pragma Id. If found, the value returned is the N_Pragma @@ -8500,6 +8504,8 @@ package Einfo is -- Test if the node N is the name of an entity (i.e. is an identifier, -- expanded name, or an attribute reference that returns an entity). + -- WARNING: There is a matching C declaration of this subprogram in fe.h + procedure Link_Entities (First : Entity_Id; Second : Entity_Id); -- Link entities First and Second in one entity chain. -- diff --git a/gcc/ada/elists.ads b/gcc/ada/elists.ads index 7a8a08bf02d..8a3b364da59 100644 --- a/gcc/ada/elists.ads +++ b/gcc/ada/elists.ads @@ -37,6 +37,9 @@ -- through the nodes themselves (using the Link field), which is more time -- and space efficient, but a node can be only one such list. +-- WARNING: There is a C version of this package. Any changes to this +-- source file must be properly reflected in the C header file elists.h + with Types; use Types; with System; diff --git a/gcc/ada/elists.h b/gcc/ada/elists.h index 1b8588f7ff9..ac6efa24e3c 100644 --- a/gcc/ada/elists.h +++ b/gcc/ada/elists.h @@ -23,9 +23,9 @@ * * ****************************************************************************/ -/* This is the C header corresponding to the Ada package specification for - Elists. It also contains the implementations of inlined functions from the - package body for Elists. It was generated manually from elists.ads and +/* This is the C header that corresponds to the Ada package specification for + Elists. It also contains the implementation of inlined functions from the + package body for Elists. It was created manually from elists.ads and elists.adb and must be kept synchronized with changes in these files. Note that only routines for reading the tree are included, since the diff --git a/gcc/ada/err_vars.ads b/gcc/ada/err_vars.ads index 861a4eeb9a6..cc0ffeba22f 100644 --- a/gcc/ada/err_vars.ads +++ b/gcc/ada/err_vars.ads @@ -113,6 +113,8 @@ package Err_Vars is Error_Msg_Uint_2 : Uint; -- Uint values for ^ insertion characters in message + -- WARNING: There is a matching C declaration of these variables in fe.h + Error_Msg_Sloc : Source_Ptr; -- Source location for # insertion character in message diff --git a/gcc/ada/errout.ads b/gcc/ada/errout.ads index 37db3e585ff..dfa6b8671f3 100644 --- a/gcc/ada/errout.ads +++ b/gcc/ada/errout.ads @@ -734,6 +734,8 @@ package Errout is -- suppressed if the node N already has a message posted, or if it is a -- warning and N is an entity node for which warnings are suppressed. + -- WARNING: There is a matching C declaration of this subprogram in fe.h + procedure Error_Msg_F (Msg : String; N : Node_Id); -- Similar to Error_Msg_N except that the message is placed on the first -- node of the construct N (First_Node (N)). Note that this procedure uses @@ -750,6 +752,8 @@ package Errout is -- will contain a & or } as usual to mark the insertion point. This -- routine can be called from the parser or the analyzer. + -- WARNING: There is a matching C declaration of this subprogram in fe.h + procedure Error_Msg_FE (Msg : String; N : Node_Id; @@ -948,6 +952,8 @@ package Errout is -- This name is the identifier name as passed, cased according to the -- default identifier casing for the given file. + -- WARNING: There is a matching C declaration of this subprogram in fe.h + Size_Too_Small_Message : constant String := "size for& too small, minimum allowed is ^"; -- This message is explicitly tested in Special_Msg_Delete in the package diff --git a/gcc/ada/exp_ch11.ads b/gcc/ada/exp_ch11.ads index e5d8e217196..afc9a402651 100644 --- a/gcc/ada/exp_ch11.ads +++ b/gcc/ada/exp_ch11.ads @@ -70,6 +70,8 @@ package Exp_Ch11 is -- a goto statement. If Local_Raise is defined, its entity is returned, -- if not, Empty is returned (in which case the call is silently skipped). + -- WARNING: There is a matching C declaration of this subprogram in fe.h + function Get_RT_Exception_Entity (R : RT_Exception_Code) return Entity_Id; -- This function is provided for use by the back end in conjunction with -- generation of Local_Raise calls when an exception raise is converted to @@ -77,11 +79,15 @@ package Exp_Ch11 is -- to determine which Rcheck_nn procedure to call. The returned result is -- the exception entity to be passed to Local_Raise. + -- WARNING: There is a matching C declaration of this subprogram in fe.h + procedure Get_RT_Exception_Name (Code : RT_Exception_Code); -- This procedure is provided for use by the back end to obtain the name of -- the Rcheck procedure for Code. The name is appended to Namet.Name_Buffer -- without the __gnat_rcheck_ prefix. + -- WARNING: There is a matching C declaration of this subprogram in fe.h + procedure Possible_Local_Raise (N : Node_Id; E : Entity_Id); -- This procedure is called whenever node N might cause the back end -- to generate a local raise for a local Constraint/Program/Storage_Error @@ -95,4 +101,6 @@ package Exp_Ch11 is -- Issues warning if No_Exception_Propagation restriction is set. N is the -- node for the handler. + -- WARNING: There is a matching C declaration of this subprogram in fe.h + end Exp_Ch11; diff --git a/gcc/ada/exp_code.ads b/gcc/ada/exp_code.ads index 6c0cce77fd2..f0b0111949a 100644 --- a/gcc/ada/exp_code.ads +++ b/gcc/ada/exp_code.ads @@ -38,6 +38,8 @@ package Exp_Code is -- Note that the implementations of these routines must not attempt -- to expand tables that are frozen on entry to Gigi. + -- WARNING: There is a matching C declaration of these subprograms in fe.h + function Is_Asm_Volatile (N : Node_Id) return Boolean; -- Given an N_Code_Statement node N, return True if Volatile=True is -- specified, and False if Volatile=False is specified (or set by default). diff --git a/gcc/ada/exp_dbug.ads b/gcc/ada/exp_dbug.ads index 93b978378f9..f2e2e6045b2 100644 --- a/gcc/ada/exp_dbug.ads +++ b/gcc/ada/exp_dbug.ads @@ -441,6 +441,8 @@ package Exp_Dbug is -- generating code, since the necessary information for computing the -- proper external name is not available in this case. + -- WARNING: There is a matching C declaration of this subprogram in fe.h + ------------------------------------- -- Encoding for translation into C -- ------------------------------------- @@ -926,6 +928,8 @@ package Exp_Dbug is -- if we are not generating code, since the necessary information for -- computing the proper encoded name is not available in this case. + -- WARNING: There is a matching C declaration of this subprogram in fe.h + -------------- -- Renaming -- -------------- @@ -1391,6 +1395,8 @@ package Exp_Dbug is -- of the string in Name_Len, and an ASCII.NUL character stored following -- the name. + -- WARNING: There is a matching C declaration of this subprogram in fe.h + --------------------------------- -- Subtypes of Variant Records -- --------------------------------- diff --git a/gcc/ada/exp_tss.ads b/gcc/ada/exp_tss.ads index 61f2685dc87..91c0c6740e7 100644 --- a/gcc/ada/exp_tss.ads +++ b/gcc/ada/exp_tss.ads @@ -150,6 +150,8 @@ package Exp_Tss is function Is_Init_Proc (E : Entity_Id) return Boolean; -- Version for init procs, same as Is_TSS (E, TSS_Init_Proc); + -- WARNING: There is a matching C declaration of this subprogram in fe.h + function Is_TSS (E : Entity_Id; Nam : TSS_Name_Type) return Boolean; -- Determines if given entity (E) is the name of a TSS identified by Nam diff --git a/gcc/ada/exp_util.ads b/gcc/ada/exp_util.ads index 02fb233f97c..03008ba0166 100644 --- a/gcc/ada/exp_util.ads +++ b/gcc/ada/exp_util.ads @@ -599,6 +599,8 @@ package Exp_Util is -- record component containing the tag of Iface if T implements Iface or -- Empty if it does not. + -- WARNING: There is a matching C declaration of this subprogram in fe.h + function Find_Prim_Op (T : Entity_Id; Name : Name_Id) return Entity_Id; -- Find the first primitive operation of a tagged type T with name Name. -- This function allows the use of a primitive operation which is not @@ -784,6 +786,8 @@ package Exp_Util is -- routine is useful for the case of a discriminated type, and testing for -- component overlap would be a pain. + -- WARNING: There is a matching C declaration of this subprogram in fe.h + function Is_Library_Level_Tagged_Type (Typ : Entity_Id) return Boolean; -- Return True if Typ is a library level tagged type. Currently we use -- this information to build statically allocated dispatch tables. diff --git a/gcc/ada/fe.h b/gcc/ada/fe.h index f62d67ee12f..0ccd1a01ddd 100644 --- a/gcc/ada/fe.h +++ b/gcc/ada/fe.h @@ -29,8 +29,14 @@ * * ****************************************************************************/ -/* This file contains declarations to access front-end functions and variables - used by gigi. +/* This is the C header that contains the declarations of Ada subprograms and + variables used by gigi and not declared in other C header files. It was + created manually from Ada specifications. The original Ada declarations + in these specifications must be marked with: + + "WARNING: There is a matching C declaration of this in fe.h" + + where is either "subprogram" or "variable". WARNING: functions taking String_Pointer parameters must abide by the rule documented alongside the definition of String_Pointer in types.h. */ @@ -41,23 +47,21 @@ extern "C" { /* atree: */ -#define Serious_Errors_Detected atree__serious_errors_detected +#define Serious_Errors_Detected atree__serious_errors_detected -/* comperr: */ +extern Nat Serious_Errors_Detected; -#define Compiler_Abort comperr__compiler_abort -extern int Compiler_Abort (String_Pointer, String_Pointer, Boolean) ATTRIBUTE_NORETURN; +/* comperr: */ -/* csets: */ +#define Compiler_Abort comperr__compiler_abort -#define Fold_Lower(C) csets__fold_lower[C] -#define Fold_Upper(C) csets__fold_upper[C] -extern char Fold_Lower[], Fold_Upper[]; +extern int Compiler_Abort (String_Pointer, String_Pointer, Boolean) ATTRIBUTE_NORETURN; /* debug: */ #define Debug_Flag_Dot_R debug__debug_flag_dot_r #define Debug_Flag_NN debug__debug_flag_nn + extern Boolean Debug_Flag_Dot_R; extern Boolean Debug_Flag_NN; @@ -81,59 +85,58 @@ extern void Set_Normalized_First_Bit (Entity_Id, Uint); extern void Set_Normalized_Position (Entity_Id, Uint); extern void Set_RM_Size (Entity_Id, Uint); -#define Is_Entity_Name einfo__is_entity_name +#define Is_Entity_Name einfo__is_entity_name + extern Boolean Is_Entity_Name (Node_Id); -#define Get_Attribute_Definition_Clause einfo__get_attribute_definition_clause +#define Get_Attribute_Definition_Clause einfo__get_attribute_definition_clause + extern Node_Id Get_Attribute_Definition_Clause (Entity_Id, unsigned char); /* errout: */ -#define Error_Msg_N errout__error_msg_n -#define Error_Msg_NE errout__error_msg_ne -#define Set_Identifier_Casing errout__set_identifier_casing +#define Error_Msg_N errout__error_msg_n +#define Error_Msg_NE errout__error_msg_ne +#define Set_Identifier_Casing errout__set_identifier_casing -extern void Error_Msg_N (String_Pointer, Node_Id); -extern void Error_Msg_NE (String_Pointer, Node_Id, Entity_Id); -extern void Set_Identifier_Casing (Char *, const Char *); +extern void Error_Msg_N (String_Pointer, Node_Id); +extern void Error_Msg_NE (String_Pointer, Node_Id, Entity_Id); +extern void Set_Identifier_Casing (Char *, const Char *); /* err_vars: */ -#define Error_Msg_Node_2 err_vars__error_msg_node_2 -#define Error_Msg_Uint_1 err_vars__error_msg_uint_1 -#define Error_Msg_Uint_2 err_vars__error_msg_uint_2 +#define Error_Msg_Uint_1 err_vars__error_msg_uint_1 +#define Error_Msg_Uint_2 err_vars__error_msg_uint_2 -extern Entity_Id Error_Msg_Node_2; -extern Uint Error_Msg_Uint_1; -extern Uint Error_Msg_Uint_2; -extern Nat Serious_Errors_Detected; +extern Uint Error_Msg_Uint_1; +extern Uint Error_Msg_Uint_2; /* exp_ch11: */ -#define Get_Local_Raise_Call_Entity exp_ch11__get_local_raise_call_entity -#define Get_RT_Exception_Entity exp_ch11__get_rt_exception_entity -#define Get_RT_Exception_Name exp_ch11__get_rt_exception_name -#define Warn_If_No_Local_Raise exp_ch11__warn_if_no_local_raise +#define Get_Local_Raise_Call_Entity exp_ch11__get_local_raise_call_entity +#define Get_RT_Exception_Entity exp_ch11__get_rt_exception_entity +#define Get_RT_Exception_Name exp_ch11__get_rt_exception_name +#define Warn_If_No_Local_Raise exp_ch11__warn_if_no_local_raise -extern Entity_Id Get_Local_Raise_Call_Entity (void); -extern Entity_Id Get_RT_Exception_Entity (int); -extern void Get_RT_Exception_Name (int); -extern void Warn_If_No_Local_Raise (int); +extern Entity_Id Get_Local_Raise_Call_Entity (void); +extern Entity_Id Get_RT_Exception_Entity (int); +extern void Get_RT_Exception_Name (int); +extern void Warn_If_No_Local_Raise (int); /* exp_code: */ -#define Asm_Input_Constraint exp_code__asm_input_constraint -#define Asm_Input_Value exp_code__asm_input_value -#define Asm_Output_Constraint exp_code__asm_output_constraint -#define Asm_Output_Variable exp_code__asm_output_variable -#define Asm_Template exp_code__asm_template -#define Clobber_Get_Next exp_code__clobber_get_next -#define Clobber_Setup exp_code__clobber_setup -#define Is_Asm_Volatile exp_code__is_asm_volatile -#define Next_Asm_Input exp_code__next_asm_input -#define Next_Asm_Output exp_code__next_asm_output -#define Setup_Asm_Inputs exp_code__setup_asm_inputs -#define Setup_Asm_Outputs exp_code__setup_asm_outputs +#define Asm_Input_Constraint exp_code__asm_input_constraint +#define Asm_Input_Value exp_code__asm_input_value +#define Asm_Output_Constraint exp_code__asm_output_constraint +#define Asm_Output_Variable exp_code__asm_output_variable +#define Asm_Template exp_code__asm_template +#define Clobber_Get_Next exp_code__clobber_get_next +#define Clobber_Setup exp_code__clobber_setup +#define Is_Asm_Volatile exp_code__is_asm_volatile +#define Next_Asm_Input exp_code__next_asm_input +#define Next_Asm_Output exp_code__next_asm_output +#define Setup_Asm_Inputs exp_code__setup_asm_inputs +#define Setup_Asm_Outputs exp_code__setup_asm_outputs extern Node_Id Asm_Input_Constraint (void); extern Node_Id Asm_Input_Value (void); @@ -150,22 +153,24 @@ extern void Setup_Asm_Outputs (Node_Id); /* exp_dbug: */ -#define Get_Encoded_Name exp_dbug__get_encoded_name -#define Get_External_Name exp_dbug__get_external_name +#define Get_Encoded_Name exp_dbug__get_encoded_name +#define Get_External_Name exp_dbug__get_external_name +#define Get_Variant_Encoding exp_dbug__get_variant_encoding -extern void Get_Encoded_Name (Entity_Id); -extern void Get_External_Name (Entity_Id, Boolean, String_Pointer); +extern void Get_Encoded_Name (Entity_Id); +extern void Get_External_Name (Entity_Id, Boolean, String_Pointer); +extern void Get_Variant_Encoding (Entity_Id); /* exp_tss: */ -#define Is_Init_Proc exp_tss__is_init_proc +#define Is_Init_Proc exp_tss__is_init_proc extern Boolean Is_Init_Proc (Entity_Id); /* exp_util: */ -#define Is_Fully_Repped_Tagged_Type exp_util__is_fully_repped_tagged_type -#define Find_Interface_Tag exp_util__find_interface_tag +#define Is_Fully_Repped_Tagged_Type exp_util__is_fully_repped_tagged_type +#define Find_Interface_Tag exp_util__find_interface_tag extern Boolean Is_Fully_Repped_Tagged_Type (Entity_Id); extern Entity_Id Find_Interface_Tag (Entity_Id, Entity_Id); @@ -175,26 +180,23 @@ extern Entity_Id Find_Interface_Tag (Entity_Id, Entity_Id); #define Cunit lib__cunit #define Ident_String lib__ident_string #define In_Extended_Main_Code_Unit lib__in_extended_main_code_unit -#define In_Same_Source_Unit lib__in_same_source_unit extern Node_Id Cunit (Unit_Number_Type); extern Node_Id Ident_String (Unit_Number_Type); extern Boolean In_Extended_Main_Code_Unit (Entity_Id); -extern Boolean In_Same_Source_Unit (Node_Id, Node_Id); /* opt: */ -#define Back_End_Inlining opt__back_end_inlining -#define Debug_Generated_Code opt__debug_generated_code -#define Exception_Extra_Info opt__exception_extra_info -#define Exception_Locations_Suppressed opt__exception_locations_suppressed -#define Exception_Mechanism opt__exception_mechanism -#define Float_Format opt__float_format -#define Generate_SCO_Instance_Table opt__generate_sco_instance_table -#define GNAT_Mode opt__gnat_mode -#define List_Representation_Info opt__list_representation_info -#define No_Strict_Aliasing_CP opt__no_strict_aliasing -#define Suppress_Checks opt__suppress_checks +#define Back_End_Inlining opt__back_end_inlining +#define Debug_Generated_Code opt__debug_generated_code +#define Exception_Extra_Info opt__exception_extra_info +#define Exception_Locations_Suppressed opt__exception_locations_suppressed +#define Exception_Mechanism opt__exception_mechanism +#define Generate_SCO_Instance_Table opt__generate_sco_instance_table +#define GNAT_Mode opt__gnat_mode +#define List_Representation_Info opt__list_representation_info +#define No_Strict_Aliasing_CP opt__no_strict_aliasing +#define Suppress_Checks opt__suppress_checks typedef enum { Front_End_SJLJ, Back_End_ZCX, Back_End_SJLJ @@ -205,122 +207,135 @@ extern Boolean Debug_Generated_Code; extern Boolean Exception_Extra_Info; extern Boolean Exception_Locations_Suppressed; extern Exception_Mechanism_Type Exception_Mechanism; -extern Char Float_Format; extern Boolean Generate_SCO_Instance_Table; extern Boolean GNAT_Mode; extern Int List_Representation_Info; extern Boolean No_Strict_Aliasing_CP; extern Boolean Suppress_Checks; -#define ZCX_Exceptions opt__zcx_exceptions -#define SJLJ_Exceptions opt__sjlj_exceptions -#define Front_End_Exceptions opt__front_end_exceptions -#define Back_End_Exceptions opt__back_end_exceptions +#define ZCX_Exceptions opt__zcx_exceptions +#define SJLJ_Exceptions opt__sjlj_exceptions +#define Front_End_Exceptions opt__front_end_exceptions +#define Back_End_Exceptions opt__back_end_exceptions -extern Boolean ZCX_Exceptions (void); -extern Boolean SJLJ_Exceptions (void); -extern Boolean Front_End_Exceptions (void); -extern Boolean Back_End_Exceptions (void); +extern Boolean ZCX_Exceptions (void); +extern Boolean SJLJ_Exceptions (void); +extern Boolean Front_End_Exceptions (void); +extern Boolean Back_End_Exceptions (void); /* restrict: */ -#define No_Exception_Handlers_Set restrict__no_exception_handlers_set -#define Check_No_Implicit_Heap_Alloc restrict__check_no_implicit_heap_alloc -#define Check_No_Implicit_Task_Alloc restrict__check_no_implicit_task_alloc -#define Check_No_Implicit_Protected_Alloc restrict__check_no_implicit_protected_alloc -#define Check_Elaboration_Code_Allowed restrict__check_elaboration_code_allowed -#define Check_Implicit_Dynamic_Code_Allowed restrict__check_implicit_dynamic_code_allowed - -extern Boolean No_Exception_Handlers_Set (void); -extern void Check_No_Implicit_Heap_Alloc (Node_Id); -extern void Check_No_Implicit_Task_Alloc (Node_Id); -extern void Check_No_Implicit_Protected_Alloc (Node_Id); -extern void Check_Elaboration_Code_Allowed (Node_Id); -extern void Check_Implicit_Dynamic_Code_Allowed (Node_Id); +#define Check_Elaboration_Code_Allowed \ + restrict__check_elaboration_code_allowed +#define Check_Implicit_Dynamic_Code_Allowed \ + restrict__check_implicit_dynamic_code_allowed +#define Check_No_Implicit_Heap_Alloc \ + restrict__check_no_implicit_heap_alloc +#define Check_No_Implicit_Protected_Alloc \ + restrict__check_no_implicit_protected_alloc +#define Check_No_Implicit_Task_Alloc \ + restrict__check_no_implicit_task_alloc +#define No_Exception_Handlers_Set \ + restrict__no_exception_handlers_set + +extern void Check_Elaboration_Code_Allowed (Node_Id); +extern void Check_Implicit_Dynamic_Code_Allowed (Node_Id); +extern void Check_No_Implicit_Heap_Alloc (Node_Id); +extern void Check_No_Implicit_Protected_Alloc (Node_Id); +extern void Check_No_Implicit_Task_Alloc (Node_Id); +extern Boolean No_Exception_Handlers_Set (void); /* sem_aggr: */ -#define Is_Others_Aggregate sem_aggr__is_others_aggregate +#define Is_Others_Aggregate sem_aggr__is_others_aggregate -extern Boolean Is_Others_Aggregate (Node_Id); +extern Boolean Is_Others_Aggregate (Node_Id); /* sem_aux: */ -#define Ancestor_Subtype sem_aux__ancestor_subtype -#define Constant_Value sem_aux__constant_value -#define First_Discriminant sem_aux__first_discriminant -#define First_Stored_Discriminant sem_aux__first_stored_discriminant -#define First_Subtype sem_aux__first_subtype -#define Is_By_Reference_Type sem_aux__is_by_reference_type -#define Is_Derived_Type sem_aux__is_derived_type - -extern Entity_Id Ancestor_Subtype (Entity_Id); -extern Node_Id Constant_Value (Entity_Id); -extern Entity_Id First_Discriminant (Entity_Id); -extern Entity_Id First_Stored_Discriminant (Entity_Id); -extern Entity_Id First_Subtype (Entity_Id); -extern Boolean Is_By_Reference_Type (Entity_Id); -extern Boolean Is_Derived_Type (Entity_Id); +#define Ancestor_Subtype sem_aux__ancestor_subtype +#define Constant_Value sem_aux__constant_value +#define First_Discriminant sem_aux__first_discriminant +#define First_Stored_Discriminant sem_aux__first_stored_discriminant +#define First_Subtype sem_aux__first_subtype +#define Is_By_Reference_Type sem_aux__is_by_reference_type +#define Is_Derived_Type sem_aux__is_derived_type + +extern Entity_Id Ancestor_Subtype (Entity_Id); +extern Node_Id Constant_Value (Entity_Id); +extern Entity_Id First_Discriminant (Entity_Id); +extern Entity_Id First_Stored_Discriminant (Entity_Id); +extern Entity_Id First_Subtype (Entity_Id); +extern Boolean Is_By_Reference_Type (Entity_Id); +extern Boolean Is_Derived_Type (Entity_Id); /* sem_eval: */ #define Compile_Time_Known_Value sem_eval__compile_time_known_value -#define Expr_Value sem_eval__expr_value -#define Expr_Value_S sem_eval__expr_value_s #define Is_OK_Static_Expression sem_eval__is_ok_static_expression -#define Is_OK_Static_Subtype sem_eval__is_ok_static_subtype -extern Uint Expr_Value (Node_Id); -extern Node_Id Expr_Value_S (Node_Id); -extern Boolean Compile_Time_Known_Value (Node_Id); -extern Boolean Is_OK_Static_Expression (Node_Id); -extern Boolean Is_OK_Static_Subtype (Entity_Id); +extern Boolean Compile_Time_Known_Value (Node_Id); +extern Boolean Is_OK_Static_Expression (Node_Id); /* sem_util: */ #define Defining_Entity sem_util__defining_entity #define First_Actual sem_util__first_actual -#define Next_Actual sem_util__next_actual #define Is_Atomic_Object sem_util__is_atomic_object #define Is_Variable_Size_Record sem_util__is_variable_size_record #define Is_Volatile_Object sem_util__is_volatile_object +#define Next_Actual sem_util__next_actual #define Requires_Transient_Scope sem_util__requires_transient_scope extern Entity_Id Defining_Entity (Node_Id); extern Node_Id First_Actual (Node_Id); -extern Node_Id Next_Actual (Node_Id); extern Boolean Is_Atomic_Object (Node_Id); extern Boolean Is_Variable_Size_Record (Entity_Id Id); extern Boolean Is_Volatile_Object (Node_Id); +extern Node_Id Next_Actual (Node_Id); extern Boolean Requires_Transient_Scope (Entity_Id); /* sinfo: */ #define End_Location sinfo__end_location -#define Set_Has_No_Elaboration_Code sinfo__set_has_no_elaboration_code +#define Set_Has_No_Elaboration_Code sinfo__set_has_no_elaboration_code #define Set_Present_Expr sinfo__set_present_expr extern Source_Ptr End_Location (Node_Id); extern void Set_Has_No_Elaboration_Code (Node_Id, Boolean); extern void Set_Present_Expr (Node_Id, Uint); +/* sinput: */ + +#define Debug_Source_Name sinput__debug_source_name +#define Get_Column_Number sinput__get_column_number +#define Get_Logical_Line_Number sinput__get_logical_line_number +#define Get_Source_File_Index sinput__get_source_file_index + +extern File_Name_Type Debug_Source_Name (Source_File_Index); +extern Column_Number_Type Get_Column_Number (Source_Ptr); +extern Line_Number_Type Get_Logical_Line_Number (Source_Ptr); +extern Source_File_Index Get_Source_File_Index (Source_Ptr); + /* targparm: */ -#define Backend_Overflow_Checks_On_Target targparm__backend_overflow_checks_on_target -#define Machine_Overflows_On_Target targparm__machine_overflows_on_target -#define Signed_Zeros_On_Target targparm__signed_zeros_on_target -#define Stack_Check_Probes_On_Target targparm__stack_check_probes_on_target -#define Stack_Check_Limits_On_Target targparm__stack_check_limits_on_target +#define Machine_Overflows_On_Target \ + targparm__machine_overflows_on_target +#define Signed_Zeros_On_Target \ + targparm__signed_zeros_on_target +#define Stack_Check_Limits_On_Target \ + targparm__stack_check_limits_on_target +#define Stack_Check_Probes_On_Target \ + targparm__stack_check_probes_on_target -extern Boolean Backend_Overflow_Checks_On_Target; extern Boolean Machine_Overflows_On_Target; extern Boolean Signed_Zeros_On_Target; -extern Boolean Stack_Check_Probes_On_Target; extern Boolean Stack_Check_Limits_On_Target; +extern Boolean Stack_Check_Probes_On_Target; /* warnsw: */ -#define Warn_On_Questionable_Layout warnsw__warn_on_questionable_layout +#define Warn_On_Questionable_Layout warnsw__warn_on_questionable_layout extern Boolean Warn_On_Questionable_Layout; diff --git a/gcc/ada/lib.ads b/gcc/ada/lib.ads index 7665f86db89..f20a18f50e9 100644 --- a/gcc/ada/lib.ads +++ b/gcc/ada/lib.ads @@ -476,6 +476,8 @@ package Lib is function Unit_Name (U : Unit_Number_Type) return Unit_Name_Type; -- Get value of named field from given units table entry + -- WARNING: There is a matching C declaration of a few subprograms in fe.h + procedure Set_Cunit (U : Unit_Number_Type; N : Node_Id); procedure Set_Cunit_Entity (U : Unit_Number_Type; E : Entity_Id); procedure Set_Dynamic_Elab (U : Unit_Number_Type; B : Boolean := True); @@ -617,6 +619,8 @@ package Lib is -- the special case check to that routine. This avoids some difficulties -- with some other calls that malfunctioned with the odd return of True. + -- WARNING: There is a matching C declaration of this subprogram in fe.h + function In_Extended_Main_Code_Unit (Loc : Source_Ptr) return Boolean; -- Same function as above, but argument is a source pointer rather -- than a node. diff --git a/gcc/ada/namet.ads b/gcc/ada/namet.ads index bdd3dad04ac..c00fdefa8f5 100644 --- a/gcc/ada/namet.ads +++ b/gcc/ada/namet.ads @@ -38,7 +38,6 @@ package Namet is -- WARNING: There is a C version of this package. Any changes to this -- source file must be properly reflected in the C header file namet.h --- which is created manually from namet.ads and namet.adb. -- This package contains routines for handling the names table. The table -- is used to store character strings for identifiers and operator symbols, diff --git a/gcc/ada/namet.h b/gcc/ada/namet.h index dfd93bb2e3c..d6011fafdfe 100644 --- a/gcc/ada/namet.h +++ b/gcc/ada/namet.h @@ -23,9 +23,10 @@ * * ****************************************************************************/ -/* This is the C file that corresponds to the Ada package specification - Namet. It was created manually from files namet.ads and namet.adb. - Subprograms from Exp_Dbug and Sinput are also made accessible here. */ +/* This is the C header that corresponds to the Ada package specification for + Namet. It also contains the implementation of inlined functions from the + package body for Namet. It was created manually from namet.ads and + namet.adb and must be kept synchronized with changes in these files. */ #ifdef __cplusplus extern "C" { @@ -85,43 +86,6 @@ Get_Name_String (Name_Id Id) #define Name_Equals namet__name_equals extern Boolean Name_Equals (Name_Id, Name_Id); -/* The following routines and variables are not part of Namet, but we - include the header here since it seems the best place for it. */ - -#define Get_Encoded_Type_Name exp_dbug__get_encoded_type_name -extern Boolean Get_Encoded_Type_Name (Entity_Id); -#define Get_Variant_Encoding exp_dbug__get_variant_encoding -extern void Get_Variant_Encoding (Entity_Id); - -#define Spec_Context_List exp_dbug__spec_context_list -#define Body_Context_List exp_dbug__body_context_list -extern char *Spec_Context_List, *Body_Context_List; -#define Spec_Filename exp_dbug__spec_filename -#define Body_Filename exp_dbug__body_filename -extern char *Spec_Filename, *Body_Filename; - -/* Here are some functions in sinput.adb we call from trans.c. */ - -typedef Nat Source_File_Index; -typedef Int Logical_Line_Number; -typedef Int Column_Number; - -#define Debug_Source_Name sinput__debug_source_name -#define Full_Debug_Name sinput__full_debug_name -#define Reference_Name sinput__reference_name -#define Get_Source_File_Index sinput__get_source_file_index -#define Get_Logical_Line_Number sinput__get_logical_line_number -#define Get_Column_Number sinput__get_column_number -#define Instantiation sinput__instantiation - -extern File_Name_Type Debug_Source_Name (Source_File_Index); -extern File_Name_Type Full_Debug_Name (Source_File_Index); -extern File_Name_Type Reference_Name (Source_File_Index); -extern Source_File_Index Get_Source_File_Index (Source_Ptr); -extern Logical_Line_Number Get_Logical_Line_Number (Source_Ptr); -extern Column_Number Get_Column_Number (Source_Ptr); -extern Source_Ptr Instantiation (Source_File_Index); - #ifdef __cplusplus } #endif diff --git a/gcc/ada/nlists.ads b/gcc/ada/nlists.ads index 6aec482a289..1c6ae2c09d7 100644 --- a/gcc/ada/nlists.ads +++ b/gcc/ada/nlists.ads @@ -35,6 +35,9 @@ -- package Elists which provides another form of lists that are not threaded -- through the nodes (and therefore allow nodes to be on multiple lists). +-- WARNING: There is a C version of this package. Any changes to this +-- source file must be properly reflected in the C header file nlists.h + with System; with Types; use Types; diff --git a/gcc/ada/nlists.h b/gcc/ada/nlists.h index 947556156ae..b678bab9cae 100644 --- a/gcc/ada/nlists.h +++ b/gcc/ada/nlists.h @@ -23,9 +23,9 @@ * * ****************************************************************************/ -/* This is the C header corresponding to the Ada package specification for - Nlists. It also contains the implementations of inlined functions from - the package body for Nlists. It was generated manually from nlists.ads and +/* This is the C header that corresponds to the Ada package specification for + Nlists. It also contains the implementation of inlined functions from the + package body for Nlists. It was created manually from nlists.ads and nlists.adb and must be kept synchronized with changes in these files. Note that only routines for reading the tree are included, since the diff --git a/gcc/ada/opt.ads b/gcc/ada/opt.ads index 1f068dcf4fc..94534642a2d 100644 --- a/gcc/ada/opt.ads +++ b/gcc/ada/opt.ads @@ -273,6 +273,8 @@ package Opt is -- switches -gnatN or -gnatd.z are used. See circuitry in gnat1drv for the -- exact conditions for setting this switch. + -- WARNING: There is a matching C declaration of this variable in fe.h + Bind_Alternate_Main_Name : Boolean := False; -- GNATBIND -- True if main should be called Alternate_Main_Name.all. @@ -458,6 +460,8 @@ package Opt is -- of the original source code. Causes debugging information to be -- written with respect to the generated code file that is written. + -- WARNING: There is a matching C declaration of this variable in fe.h + Default_Pool : Node_Id := Empty; -- GNAT -- Used to record the storage pool name (or null literal) that is the @@ -595,11 +599,15 @@ package Opt is -- associated with exception messages (in particular range and index -- checks). + -- WARNING: There is a matching C declaration of this variable in fe.h + Exception_Locations_Suppressed : Boolean := False; -- GNAT -- Set to True if a Suppress_Exception_Locations configuration pragma is -- currently active. + -- WARNING: There is a matching C declaration of this variable in fe.h + type Exception_Mechanism_Type is -- Determines the kind of mechanism used to handle exceptions -- @@ -630,6 +638,8 @@ package Opt is -- (Frontend_Exceptions + ZCX_By_Default). The C convention is there to -- allow access by gigi. + -- WARNING: There is a matching C declaration of this variable in fe.h + function Back_End_Exceptions return Boolean; function Front_End_Exceptions return Boolean; function ZCX_Exceptions return Boolean; @@ -637,6 +647,8 @@ package Opt is -- GNAT -- Various properties of the active Exception_Mechanism + -- WARNING: There is a matching C declaration of these subprograms in fe.h + Exception_Tracebacks : Boolean := False; -- GNATBIND -- Set to True to store tracebacks in exception occurrences (-Ea or -E) @@ -781,6 +793,8 @@ package Opt is -- True when switch -fdump-scos is used. When True, a table of instances is -- included in SCOs. + -- WARNING: There is a matching C declaration of this variable in fe.h + Generating_Code : Boolean := False; -- GNAT -- True if the frontend finished its work and has called the backend to @@ -1008,6 +1022,8 @@ package Opt is -- 3 = like 2, but variable fields are decoded symbolically -- 4 = like 3, but list rep info for relevant compiler-generated types + -- WARNING: There is a matching C declaration of this variable in fe.h + List_Representation_Info_To_File : Boolean := False; -- GNAT -- Set true by -gnatRs switch. Causes information from -gnatR[1-4]m to be @@ -1209,6 +1225,8 @@ package Opt is -- GNAT -- Set True if pragma No_Strict_Aliasing with no parameters encountered. + -- WARNING: There is a matching C declaration of this variable in fe.h + No_Tagged_Streams : Node_Id := Empty; -- GNAT -- If a pragma No_Tagged_Streams is active for the current scope, this @@ -1541,6 +1559,8 @@ package Opt is -- GNAT -- Set to True if -gnatp (suppress all checks) switch present. + -- WARNING: There is a matching C declaration of this variable in fe.h + Suppress_Options : Suppress_Record; -- GNAT -- Indicates outer level setting of check suppression. This initializes @@ -2293,6 +2313,8 @@ package Opt is -- GNAT -- True if compiling in GNAT system mode (-gnatg switch) + -- WARNING: There is a matching C declaration of this variable in fe.h + GNAT_Mode_Config : Boolean := False; -- GNAT -- True if -gnatg switch is present. GNAT_Mode may be temporary set to diff --git a/gcc/ada/repinfo.ads b/gcc/ada/repinfo.ads index c51948ee93c..c8eb3501773 100644 --- a/gcc/ada/repinfo.ads +++ b/gcc/ada/repinfo.ads @@ -35,6 +35,9 @@ -- compiler and in ASIS (it is used in ASIS as part of the implementation -- of the Data Decomposition Annex). +-- WARNING: There is a C version of this package. Any changes to this +-- source file must be properly reflected in the C header file repinfo.h + with Types; use Types; with Uintp; use Uintp; diff --git a/gcc/ada/repinfo.h b/gcc/ada/repinfo.h index 4708618f65f..30c3e6dc906 100644 --- a/gcc/ada/repinfo.h +++ b/gcc/ada/repinfo.h @@ -29,7 +29,9 @@ * * ****************************************************************************/ -/* This file corresponds to the Ada file repinfo.ads. */ +/* This is the C header that corresponds to the Ada package specification for + Repinfo. It was created manually from repinfo.ads and must be kept + synchronized with changes in this file. */ #ifdef __cplusplus extern "C" { diff --git a/gcc/ada/restrict.ads b/gcc/ada/restrict.ads index a8e9fb1d365..80cd0121ec5 100644 --- a/gcc/ada/restrict.ads +++ b/gcc/ada/restrict.ads @@ -307,6 +307,8 @@ package Restrict is -- elaboration routine. If elaboration code is not allowed, an error -- message is posted on the node given as argument. + -- WARNING: There is a matching C declaration of this subprogram in fe.h + procedure Check_SPARK_05_Restriction (Msg : String; N : Node_Id; @@ -337,19 +339,27 @@ package Restrict is -- that generates a trampoline. If not allowed, an error message is posted -- on the node given as argument. + -- WARNING: There is a matching C declaration of this subprogram in fe.h + procedure Check_No_Implicit_Heap_Alloc (N : Node_Id); -- Equivalent to Check_Restriction (No_Implicit_Heap_Allocations, N). -- Provided for easy use by back end, which has to check this restriction. - procedure Check_No_Implicit_Task_Alloc (N : Node_Id); - -- Equivalent to Check_Restriction (No_Implicit_Task_Allocations, N). - -- Provided for easy use by back end, which has to check this restriction. + -- WARNING: There is a matching C declaration of this subprogram in fe.h procedure Check_No_Implicit_Protected_Alloc (N : Node_Id); -- Equivalent to: -- Check_Restriction (No_Implicit_Protected_Object_Allocations, N) -- Provided for easy use by back end, which has to check this restriction. + -- WARNING: There is a matching C declaration of this subprogram in fe.h + + procedure Check_No_Implicit_Task_Alloc (N : Node_Id); + -- Equivalent to Check_Restriction (No_Implicit_Task_Allocations, N). + -- Provided for easy use by back end, which has to check this restriction. + + -- WARNING: There is a matching C declaration of this subprogram in fe.h + procedure Check_Obsolescent_2005_Entity (E : Entity_Id; N : Node_Id); -- This routine checks if the entity E is one of the obsolescent entries -- in Ada.Characters.Handling in Ada 2005 and No_Obsolescent_Features @@ -394,6 +404,8 @@ package Restrict is -- set. In the latter case, the source may contain handlers but they either -- get converted using the local goto transformation or deleted. + -- WARNING: There is a matching C declaration of this subprogram in fe.h + function No_Exception_Propagation_Active return Boolean; -- Test to see if current restrictions settings specify that no -- exception propagation is activated. diff --git a/gcc/ada/scos.ads b/gcc/ada/scos.ads index b114acb5dce..9f5629768a6 100644 --- a/gcc/ada/scos.ads +++ b/gcc/ada/scos.ads @@ -28,6 +28,9 @@ -- the ALI file, and by Get_SCO/Put_SCO to read and write the text form that -- is used in the ALI file. +-- WARNING: There is a C version of this package. Any changes to this +-- source file must be properly reflected in the C header file scos.h + with Namet; use Namet; with Table; with Types; use Types; @@ -48,9 +51,6 @@ package SCOs is -- Put_SCO reads the internal tables and generates text lines in the ALI -- format. - -- WARNING: There are C bindings for this package. Any changes to this - -- source file must be properly reflected in the C header file scos.h - -------------------- -- SCO ALI Format -- -------------------- diff --git a/gcc/ada/scos.h b/gcc/ada/scos.h index a38526436e9..53f9f3896c0 100644 --- a/gcc/ada/scos.h +++ b/gcc/ada/scos.h @@ -23,8 +23,9 @@ * * ****************************************************************************/ -/* This is the C file that corresponds to the Ada package spec SCOs. It was - created manually from the file scos.ads. */ +/* This is the C header that corresponds to the Ada package specification for + Scos. It was created manually from scos.ads and must be kept synchronized + with changes in this file. */ #ifdef __cplusplus extern "C" { diff --git a/gcc/ada/sem_aggr.ads b/gcc/ada/sem_aggr.ads index 5f06b4d4e75..1d4f3489d78 100644 --- a/gcc/ada/sem_aggr.ads +++ b/gcc/ada/sem_aggr.ads @@ -37,4 +37,6 @@ package Sem_Aggr is function Is_Others_Aggregate (Aggr : Node_Id) return Boolean; -- Returns True is aggregate Aggr consists of a single OTHERS choice + -- WARNING: There is a matching C declaration of this subprogram in fe.h + end Sem_Aggr; diff --git a/gcc/ada/sem_aux.ads b/gcc/ada/sem_aux.ads index 55cfefa92a3..ee3a2b3f501 100644 --- a/gcc/ada/sem_aux.ads +++ b/gcc/ada/sem_aux.ads @@ -91,6 +91,8 @@ package Sem_Aux is -- subtype then it returns the subtype or type from which the subtype was -- obtained, otherwise it returns Empty. + -- WARNING: There is a matching C declaration of this subprogram in fe.h + function Available_View (Ent : Entity_Id) return Entity_Id; -- Ent denotes an abstract state or a type that may come from a limited -- with clause. Return the non-limited view of Ent if there is one or Ent @@ -104,6 +106,8 @@ package Sem_Aux is -- constants from the point of view of constant folding. Empty is also -- returned for variables with no initialization expression. + -- WARNING: There is a matching C declaration of this subprogram in fe.h + function Corresponding_Unsigned_Type (Typ : Entity_Id) return Entity_Id; -- Typ is a signed integer subtype. This routine returns the standard -- unsigned type with the same Esize as the implementation base type of @@ -123,6 +127,8 @@ package Sem_Aux is -- When called on a private type with unknown discriminants, the function -- always returns Empty. + -- WARNING: There is a matching C declaration of this subprogram in fe.h + function First_Stored_Discriminant (Typ : Entity_Id) return Entity_Id; -- Typ is a type with discriminants. Gives the first discriminant stored -- in an object of this type. In many cases, these are the same as the @@ -146,11 +152,15 @@ package Sem_Aux is -- discriminants from Gigi's standpoint, i.e. those that will be stored in -- actual objects of the type. + -- WARNING: There is a matching C declaration of this subprogram in fe.h + function First_Subtype (Typ : Entity_Id) return Entity_Id; -- Applies to all types and subtypes. For types, yields the first subtype -- of the type. For subtypes, yields the first subtype of the base type of -- the subtype. + -- WARNING: There is a matching C declaration of this subprogram in fe.h + function First_Tag_Component (Typ : Entity_Id) return Entity_Id; -- Typ must be a tagged record type. This function returns the Entity for -- the first _Tag field in the record type. @@ -317,6 +327,8 @@ package Sem_Aux is -- Ent is any entity. Returns True if Ent is a type entity where the type -- is required to be passed by reference, as defined in (RM 6.2(4-9)). + -- WARNING: There is a matching C declaration of this subprogram in fe.h + function Is_Definite_Subtype (T : Entity_Id) return Boolean; -- T is a type entity. Returns True if T is a definite subtype. -- Indefinite subtypes are unconstrained arrays, unconstrained @@ -329,6 +341,8 @@ package Sem_Aux is -- Determines if the given entity Ent is a derived type. Result is always -- false if argument is not a type. + -- WARNING: There is a matching C declaration of this subprogram in fe.h + function Is_Generic_Formal (E : Entity_Id) return Boolean; -- Determine whether E is a generic formal parameter. In particular this is -- used to set the visibility of generic formals of a generic package diff --git a/gcc/ada/sem_eval.ads b/gcc/ada/sem_eval.ads index 477b5f802cf..0a2bc64c2a1 100644 --- a/gcc/ada/sem_eval.ads +++ b/gcc/ada/sem_eval.ads @@ -224,6 +224,8 @@ package Sem_Eval is -- efficient with compile time known values, e.g. range analysis for the -- purpose of removing checks is more effective if we know precise bounds. + -- WARNING: There is a matching C declaration of this subprogram in fe.h + function Compile_Time_Known_Value_Or_Aggr (Op : Node_Id) return Boolean; -- Similar to Compile_Time_Known_Value, but also returns True if the value -- is a compile-time-known aggregate, i.e. an aggregate all of whose @@ -412,6 +414,8 @@ package Sem_Eval is -- for compile time evaluation purposes. Use Compile_Time_Known_Value -- instead (see section on "Compile-Time Known Values" above). + -- WARNING: There is a matching C declaration of this subprogram in fe.h + function Is_OK_Static_Range (N : Node_Id) return Boolean; -- Determines if range is static, as defined in RM 4.9(26), and also checks -- that neither bound of the range raises constraint error, thus ensuring diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads index dc5e57b0bf6..ace843ed34e 100644 --- a/gcc/ada/sem_util.ads +++ b/gcc/ada/sem_util.ads @@ -566,6 +566,8 @@ package Sem_Util is -- debugging information, generated through Qualify_Entity_Names, and -- the loop declaration must be placed in the table Name_Qualify_Units. + -- WARNING: There is a matching C declaration of this subprogram in fe.h + function Denotes_Discriminant (N : Node_Id; Check_Concurrent : Boolean := False) return Boolean; @@ -901,6 +903,8 @@ package Sem_Util is -- Note that the value returned is always the expression (not the -- N_Parameter_Association nodes, even if named association is used). + -- WARNING: There is a matching C declaration of this subprogram in fe.h + function First_Global (Subp : Entity_Id; Global_Mode : Name_Id; @@ -1526,6 +1530,8 @@ package Sem_Util is -- Determine whether arbitrary node N denotes a reference to an atomic -- object as per Ada RM C.6(12). + -- WARNING: There is a matching C declaration of this subprogram in fe.h + function Is_Atomic_Object_Entity (Id : Entity_Id) return Boolean; -- Determine whether arbitrary entity Id denotes an atomic object as per -- Ada RM C.6(12). @@ -2062,6 +2068,8 @@ package Sem_Util is function Is_Variable_Size_Record (E : Entity_Id) return Boolean; -- Returns true if E has variable size components + -- WARNING: There is a matching C declaration of this subprogram in fe.h + function Is_Variable (N : Node_Id; Use_Original_Node : Boolean := True) return Boolean; @@ -2093,6 +2101,8 @@ package Sem_Util is -- for something actually declared as volatile, not for an object that gets -- treated as volatile (see Einfo.Treat_As_Volatile). + -- WARNING: There is a matching C declaration of this subprogram in fe.h + generic with procedure Handle_Parameter (Formal : Entity_Id; Actual : Node_Id); procedure Iterate_Call_Parameters (Call : Node_Id); @@ -2361,11 +2371,6 @@ package Sem_Util is -- when the resulting entity does not have to be referenced as a -- public entity (and in this case Is_Public is not set). - procedure Next_Actual (Actual_Id : in out Node_Id); - pragma Inline (Next_Actual); - -- Next_Actual (N) is equivalent to N := Next_Actual (N). Note that we - -- inline this procedural form, but not the functional form that follows. - function Next_Actual (Actual_Id : Node_Id) return Node_Id; -- Find next actual parameter in declaration order. As described for -- First_Actual, this is the next actual in the declaration order, not @@ -2375,16 +2380,23 @@ package Sem_Util is -- Note that the result produced is always an expression, not a parameter -- association node, even if named notation was used. - procedure Next_Global (Node : in out Node_Id); + -- WARNING: There is a matching C declaration of this subprogram in fe.h + + procedure Next_Actual (Actual_Id : in out Node_Id); pragma Inline (Next_Actual); - -- Next_Global (N) is equivalent to N := Next_Global (N). Note that we - -- inline this procedural form, but not the functional form that follows. + -- Next_Actual (N) is equivalent to N := Next_Actual (N). Note that we + -- inline this procedural form, but not the functional form above. function Next_Global (Node : Node_Id) return Node_Id; -- Node is a global item from a list, obtained through calling First_Global -- and possibly Next_Global a number of times. Returns the next global item -- with the same mode. + procedure Next_Global (Node : in out Node_Id); + pragma Inline (Next_Actual); + -- Next_Global (N) is equivalent to N := Next_Global (N). Note that we + -- inline this procedural form, but not the functional form above. + function No_Caching_Enabled (Id : Entity_Id) return Boolean; -- Given the entity of a variable, determine whether Id is subject to -- volatility property No_Caching and if it is, the related expression @@ -2588,6 +2600,8 @@ package Sem_Util is -- controlled types and variable-sized types including unconstrained -- arrays. + -- WARNING: There is a matching C declaration of this subprogram in fe.h + procedure Reset_Analyzed_Flags (N : Node_Id); -- Reset the Analyzed flags in all nodes of the tree whose root is N diff --git a/gcc/ada/sinfo.ads b/gcc/ada/sinfo.ads index 5a920669b62..c64a76f019c 100644 --- a/gcc/ada/sinfo.ads +++ b/gcc/ada/sinfo.ads @@ -10343,6 +10343,8 @@ package Sinfo is -- tree pointers (List1-4), the parent pointer of the Val node is set to -- point back to node N. This automates the setting of the parent pointer. + -- WARNING: There is a matching C declaration of a few subprograms in fe.h + procedure Set_Abort_Present (N : Node_Id; Val : Boolean := True); -- Flag15 @@ -11458,6 +11460,8 @@ package Sinfo is -- returns the location of the IF token in the END IF sequence by -- translating the value of the End_Span field. + -- WARNING: There is a matching C declaration of this subprogram in fe.h + procedure Set_End_Location (N : Node_Id; S : Source_Ptr); -- N is an N_If_Statement or N_Case_Statement node. This procedure sets -- the End_Span field to correspond to the given value S. In other words, diff --git a/gcc/ada/sinput.ads b/gcc/ada/sinput.ads index 0ef781c2fc6..c968eed98b4 100644 --- a/gcc/ada/sinput.ads +++ b/gcc/ada/sinput.ads @@ -293,6 +293,8 @@ package Sinput is -- will be 1 since system.ads is read first. function Debug_Source_Name (S : SFI) return File_Name_Type; + -- WARNING: There is a matching C declaration of this subprogram in fe.h + function File_Name (S : SFI) return File_Name_Type; function File_Type (S : SFI) return Type_Of_File; function First_Mapped_Line (S : SFI) return Logical_Line_Number; @@ -532,6 +534,8 @@ package Sinput is -- determined and returned. Tab characters if present are assumed to -- represent the standard 1,9,17.. spacing pattern. + -- WARNING: There is a matching C declaration of this subprogram in fe.h + function Get_Logical_Line_Number (P : Source_Ptr) return Logical_Line_Number; -- The line number of the specified source position is obtained by @@ -543,6 +547,8 @@ package Sinput is -- reference pragmas have been encountered, the value returned is -- the same as the physical line number. + -- WARNING: There is a matching C declaration of this subprogram in fe.h + function Get_Logical_Line_Number_Img (P : Source_Ptr) return String; -- Same as above function, but returns the line number as a string of @@ -561,6 +567,8 @@ package Sinput is -- value. This call must always succeed, since any valid source pointer -- value belongs to some previously loaded source file. + -- WARNING: There is a matching C declaration of this subprogram in fe.h + function Instantiation_Depth (S : Source_Ptr) return Nat; -- Determine instantiation depth for given Sloc value. A value of -- zero means that the given Sloc is not in an instantiation. diff --git a/gcc/ada/stringt.ads b/gcc/ada/stringt.ads index 722d17f7bc2..2ceb20cf386 100644 --- a/gcc/ada/stringt.ads +++ b/gcc/ada/stringt.ads @@ -42,6 +42,9 @@ package Stringt is -- additional string constants generated by compile time concatenation and -- other similar processing. +-- WARNING: There is a C version of this package. Any changes to this +-- source file must be properly reflected in the C header file stringt.h + -- A string constant in this table consists of a series of Char_Code values, -- so that 16-bit character codes can be properly handled if this feature -- is implemented in the scanner. diff --git a/gcc/ada/stringt.h b/gcc/ada/stringt.h index 371acdf5d0c..911c61badf4 100644 --- a/gcc/ada/stringt.h +++ b/gcc/ada/stringt.h @@ -23,8 +23,10 @@ * * ****************************************************************************/ -/* This file is the C file that corresponds to the Ada package spec - Stringt. It was created manually from stringt.ads and stringt.adb +/* This is the C header that corresponds to the Ada package specification for + Stringt. It also contains the implementations of inlined functions from the + package body for Stringt. It was created manually from stringt.ads and + stringt.adb and must be kept synchronized with changes in these files. Note: only the access functions are provided, since the tree transformer is not allowed to modify the tree or its auxiliary structures. diff --git a/gcc/ada/targparm.ads b/gcc/ada/targparm.ads index e8139baa628..d9465b5c3a1 100644 --- a/gcc/ada/targparm.ads +++ b/gcc/ada/targparm.ads @@ -455,12 +455,16 @@ package Targparm is Stack_Check_Probes_On_Target : Boolean := False; -- Indicates if the GCC probing mechanism is used + -- WARNING: There is a matching C declaration of this variable in fe.h + Stack_Check_Limits_On_Target : Boolean := False; -- Indicates if the GCC stack-limit mechanism is used -- Both flags cannot be simultaneously set to True. If neither -- is, the target independent fallback method is used. + -- WARNING: There is a matching C declaration of this variable in fe.h + Stack_Check_Default_On_Target : Boolean := False; -- Indicates if stack checking is on by default @@ -536,9 +540,13 @@ package Targparm is Machine_Overflows_On_Target : Boolean := False; -- Set to True for targets where S'Machine_Overflows is True + -- WARNING: There is a matching C declaration of this variable in fe.h + Signed_Zeros_On_Target : Boolean := True; -- Set to False on targets that do not reliably support signed zeros + -- WARNING: There is a matching C declaration of this variable in fe.h + ------------------------------------------- -- Boolean-Valued Fixed-Point Attributes -- ------------------------------------------- diff --git a/gcc/ada/types.ads b/gcc/ada/types.ads index 12974515af2..e649c4e5558 100644 --- a/gcc/ada/types.ads +++ b/gcc/ada/types.ads @@ -38,7 +38,7 @@ -- would have to be dealt with. -- WARNING: There is a C version of this package. Any changes to this source --- file must be properly reflected in the C header file types.h declarations. +-- file must be properly reflected in the C header file types.h -- Note: the declarations in this package reflect an expectation that the host -- machine has an efficient integer base type with a range at least 32 bits diff --git a/gcc/ada/types.h b/gcc/ada/types.h index 94dc22c9c86..a87340d6edd 100644 --- a/gcc/ada/types.h +++ b/gcc/ada/types.h @@ -23,8 +23,9 @@ * * ****************************************************************************/ -/* This is the C file that corresponds to the Ada package spec Types. It was - created manually from the files types.ads and types.adb. +/* This is the C header that corresponds to the Ada package specification for + Types. It was created manually from types.ads and must be kept synchronized + with changes in this file. This package contains host independent type definitions which are used throughout the compiler modules. The comments in the C version are brief @@ -306,6 +307,9 @@ typedef Int Unit_Number_Type; /* Unit number value for main unit. */ #define Main_Unit 0 +/* Type used to index the source file table. */ +typedef Nat Source_File_Index; + /* Type used for lines table. */ typedef Source_Ptr *Lines_Table_Type; diff --git a/gcc/ada/uintp.h b/gcc/ada/uintp.h index ad1b8c53c76..ed106efb87d 100644 --- a/gcc/ada/uintp.h +++ b/gcc/ada/uintp.h @@ -23,8 +23,9 @@ * * ****************************************************************************/ -/* This file corresponds to the Ada package specification Uintp. It was - created manually from the files uintp.ads and uintp.adb. */ +/* This is the C header that corresponds to the Ada package specification for + Uintp. It was created manually from uintp.ads and must be kept synchronized + with changes in this file. */ #ifdef __cplusplus extern "C" { diff --git a/gcc/ada/urealp.ads b/gcc/ada/urealp.ads index 585d894c020..55a82f22628 100644 --- a/gcc/ada/urealp.ads +++ b/gcc/ada/urealp.ads @@ -31,6 +31,9 @@ -- Support for universal real arithmetic +-- WARNING: There is a C version of this package. Any changes to this +-- source file must be properly reflected in the C header file urealp.h + with Types; use Types; with Uintp; use Uintp; diff --git a/gcc/ada/urealp.h b/gcc/ada/urealp.h index 413e71019f1..ab8656b0a61 100644 --- a/gcc/ada/urealp.h +++ b/gcc/ada/urealp.h @@ -23,8 +23,9 @@ * * ****************************************************************************/ -/* This file corresponds to the Ada package specification Urealp. It was - created manually from the files urealp.ads and urealp.adb. */ +/* This is the C header that corresponds to the Ada package specification for + Urealp. It was created manually from urealp.ads and must be kept + synchronized with changes in this file. */ #ifdef __cplusplus extern "C" { diff --git a/gcc/ada/warnsw.ads b/gcc/ada/warnsw.ads index 0a3253e2ac4..c82f36d7431 100644 --- a/gcc/ada/warnsw.ads +++ b/gcc/ada/warnsw.ads @@ -63,6 +63,8 @@ package Warnsw is -- efficiency reasons and would be improved by reordering the components. -- Off by default, modified by use of -gnatw.q/.Q (but not -gnatwa). + -- WARNING: There is a matching C declaration of this variable in fe.h + Warn_On_Record_Holes : Boolean := False; -- Warn when explicit record component clauses leave uncovered holes (gaps) -- in a record layout. Off by default, set by -gnatw.h (but not -gnatwa). -- 2.30.2