From d6de75d526bf5958fe9e66195dc0bf1c458e9b06 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Tue, 16 Feb 2021 09:00:11 +0100 Subject: [Ada] Fix type mismatch warnings during LTO bootstrap #2 gcc/ada/ * init.c (__gnat_raise_program_error): Fix parameter type. (Raise_From_Signal_Handler): Likewise and mark as no-return. * raise-gcc.c (__gnat_others_value): Fix type. (__gnat_all_others_value): Likewise. (__gnat_unhandled_others_value): Likewise. * seh_init.c (Raise_From_Signal_Handler): Fix parameter type. * libgnat/a-except.ads (Raise_From_Signal_Handler): Use convention C and new symbol name, move declaration to... (Raise_From_Controlled_Operation): Minor tweak. * libgnat/a-except.adb (Raise_From_Signal_Handler): ...here. * libgnat/a-exexpr.adb (bool): New C compatible boolean type. (Is_Handled_By_Others): Use it as return type for the function. --- gcc/ada/init.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'gcc/ada/init.c') diff --git a/gcc/ada/init.c b/gcc/ada/init.c index 88a62fd..08ff8d7 100644 --- a/gcc/ada/init.c +++ b/gcc/ada/init.c @@ -78,7 +78,7 @@ extern "C" { #endif -extern void __gnat_raise_program_error (const char *, int); +extern void __gnat_raise_program_error (const void *, int); /* Addresses of exception data blocks for predefined exceptions. Tasking_Error is not used in this unit, and the abort signal is only used on IRIX. @@ -89,17 +89,16 @@ extern struct Exception_Data program_error; extern struct Exception_Data storage_error; /* For the Cert run time we use the regular raise exception routine because - Raise_From_Signal_Handler is not available. */ + __gnat_raise_from_signal_handler is not available. */ #ifdef CERT -#define Raise_From_Signal_Handler \ - __gnat_raise_exception -extern void Raise_From_Signal_Handler (struct Exception_Data *, const char *); +#define Raise_From_Signal_Handler __gnat_raise_exception #else -#define Raise_From_Signal_Handler \ - ada__exceptions__raise_from_signal_handler -extern void Raise_From_Signal_Handler (struct Exception_Data *, const char *); +#define Raise_From_Signal_Handler __gnat_raise_from_signal_handler #endif +extern void Raise_From_Signal_Handler (struct Exception_Data *, const void *) + ATTRIBUTE_NORETURN; + /* Global values computed by the binder. Note that these variables are declared here, not in the binder file, to avoid having unresolved references in the shared libgnat. */ -- cgit v1.1