public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-1461] [Ada] Small cleanup in exception handling C code
@ 2021-06-15 10:21 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-06-15 10:21 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:385484ef92f34ff7b420312927aaa174e5a8a696

commit r12-1461-g385484ef92f34ff7b420312927aaa174e5a8a696
Author: Eric Botcazou <ebotcazou@adacore.com>
Date:   Tue Feb 9 12:52:08 2021 +0100

    [Ada] Small cleanup in exception handling C code
    
    gcc/ada/
    
            * raise-gcc.c: Include <cstdarg> instead of <stdarg.h> in C++.
            Include <stdbool.h> and unconditionally <stdlib.h> in C.

Diff:
---
 gcc/ada/raise-gcc.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/gcc/ada/raise-gcc.c b/gcc/ada/raise-gcc.c
index bbedee50960..5c3adbdb302 100644
--- a/gcc/ada/raise-gcc.c
+++ b/gcc/ada/raise-gcc.c
@@ -48,14 +48,13 @@
 # endif
 #endif
 
-#include <stdarg.h>
-
 #ifdef __cplusplus
+# include <cstdarg>
 # include <cstdlib>
 #else
-typedef char bool;
-# define true 1
-# define false 0
+# include <stdarg.h>
+# include <stdbool.h>
+# include <stdlib.h>
 #endif
 
 #include "raise.h"
@@ -123,7 +122,6 @@ extern void __gnat_raise_abort (void) __attribute__ ((noreturn));
 #define abort() __gnat_raise_abort()
 
 #elif defined(STANDALONE)
-#include <stdlib.h>
 #define inhibit_libc
 #endif


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-15 10:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-15 10:21 [gcc r12-1461] [Ada] Small cleanup in exception handling C code Pierre-Marie de Rodat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).