diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2021-01-27 07:58:17 +0100 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-05-07 05:29:12 -0400 |
commit | b0ba442b047dcffd54055c9d0ab591d020a284d8 (patch) | |
tree | 73ee9b31d437834c86704d92aa6db0b77faf2811 /gcc | |
parent | 730c196aab01296486d21c90ffac2d9f6a338422 (diff) | |
download | gcc-b0ba442b047dcffd54055c9d0ab591d020a284d8.zip gcc-b0ba442b047dcffd54055c9d0ab591d020a284d8.tar.gz gcc-b0ba442b047dcffd54055c9d0ab591d020a284d8.tar.bz2 |
[Ada] Fix type mismatch warnings during LTO bootstrap #1
gcc/ada/
* errout.ads (Set_Identifier_Casing): Add pragma Convention C.
* eval_fat.ads (Rounding_Mode): Likewise.
(Machine): Add WARNING comment line.
* exp_code.ads (Clobber_Get_Next): Add pragma Convention C.
* fe.h (Compiler_Abort): Fix return type.
(Set_Identifier_Casing): Change type of parameters.
(Clobber_Get_Next): Change return type.
* gcc-interface/trans.c (gnat_to_gnu) <N_Code_Statement>: Add cast.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/errout.ads | 1 | ||||
-rw-r--r-- | gcc/ada/eval_fat.ads | 4 | ||||
-rw-r--r-- | gcc/ada/exp_code.ads | 1 | ||||
-rw-r--r-- | gcc/ada/fe.h | 6 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/trans.c | 2 |
5 files changed, 9 insertions, 5 deletions
diff --git a/gcc/ada/errout.ads b/gcc/ada/errout.ads index baec3a7..e91c0c5 100644 --- a/gcc/ada/errout.ads +++ b/gcc/ada/errout.ads @@ -987,6 +987,7 @@ package Errout is procedure Set_Identifier_Casing (Identifier_Name : System.Address; File_Name : System.Address); + pragma Convention (C, Set_Identifier_Casing); -- This subprogram can be used by the back end for the purposes of -- concocting error messages that are not output via Errout, e.g. -- the messages generated by the gcc back end. diff --git a/gcc/ada/eval_fat.ads b/gcc/ada/eval_fat.ads index 08e6185..4947d74 100644 --- a/gcc/ada/eval_fat.ads +++ b/gcc/ada/eval_fat.ads @@ -85,8 +85,8 @@ package Eval_Fat is type Rounding_Mode is (Floor, Ceiling, Round, Round_Even); for Rounding_Mode use (0, 1, 2, 3); + pragma Convention (C, Rounding_Mode); -- Used to indicate rounding mode for Machine attribute - -- Note that C code in gigi knows that Round_Even is 3 -- The Machine attribute is special, in that it takes an extra argument -- indicating the rounding mode, and also an argument Enode that is a @@ -99,6 +99,8 @@ package Eval_Fat is Mode : Rounding_Mode; Enode : Node_Id) return T; + -- WARNING: There is a matching C declaration of this function in urealp.h + procedure Decompose_Int (RT : R; X : T; diff --git a/gcc/ada/exp_code.ads b/gcc/ada/exp_code.ads index 2e37a53..474eafc 100644 --- a/gcc/ada/exp_code.ads +++ b/gcc/ada/exp_code.ads @@ -53,6 +53,7 @@ package Exp_Code is -- with subsequent calls to Clobber_Get_Next. function Clobber_Get_Next return System.Address; + pragma Convention (C, Clobber_Get_Next); -- Can only be called after a previous call to Clobber_Setup. The -- returned value is a pointer to a null terminated (C format) string -- for the next register argument. Null_Address is returned when there diff --git a/gcc/ada/fe.h b/gcc/ada/fe.h index 9c4a572..851e4b3 100644 --- a/gcc/ada/fe.h +++ b/gcc/ada/fe.h @@ -55,7 +55,7 @@ extern Nat Serious_Errors_Detected; #define Compiler_Abort comperr__compiler_abort -extern int Compiler_Abort (String_Pointer, String_Pointer, Boolean) ATTRIBUTE_NORETURN; +extern void Compiler_Abort (String_Pointer, String_Pointer, Boolean) ATTRIBUTE_NORETURN; /* debug: */ @@ -103,7 +103,7 @@ extern Node_Id Get_Attribute_Definition_Clause (Entity_Id, unsigned 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 *); +extern void Set_Identifier_Casing (void *, const void *); /* err_vars: */ @@ -145,7 +145,7 @@ extern Node_Id Asm_Input_Value (void); extern Node_Id Asm_Output_Constraint (void); extern Node_Id Asm_Output_Variable (void); extern Node_Id Asm_Template (Node_Id); -extern char *Clobber_Get_Next (void); +extern void *Clobber_Get_Next (void); extern void Clobber_Setup (Node_Id); extern Boolean Is_Asm_Volatile (Node_Id); extern void Next_Asm_Input (void); diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c index 61a9d61..719cdec 100644 --- a/gcc/ada/gcc-interface/trans.c +++ b/gcc/ada/gcc-interface/trans.c @@ -7993,7 +7993,7 @@ gnat_to_gnu (Node_Id gnat_node) } Clobber_Setup (gnat_node); - while ((clobber = Clobber_Get_Next ())) + while ((clobber = (char *) Clobber_Get_Next ())) gnu_clobbers = tree_cons (NULL_TREE, build_string (strlen (clobber) + 1, clobber), |