From 982255c87812096278d23b38b98f678b0ad344fa Mon Sep 17 00:00:00 2001 From: "Kaveh R. Ghazi" Date: Sat, 17 Jan 1998 20:09:09 +0000 Subject: [PATCH] gengenrtl.c (type_from_format): De-ANSIfy function signature. * gengenrtl.c (type_from_format): De-ANSIfy function signature. (accessor_from_format): Likewise. (xmalloc): New function for use when linking with alloca.o. From-SVN: r17386 --- gcc/ChangeLog | 6 ++++++ gcc/gengenrtl.c | 23 +++++++++++++++++++++-- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ccca9c5567f..930924e7413 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +Sat Jan 17 21:09:46 1998 Kaveh R. Ghazi + + * gengenrtl.c (type_from_format): De-ANSIfy function signature. + (accessor_from_format): Likewise. + (xmalloc): New function for use when linking with alloca.o. + Mon Jan 5 02:53:01 1998 Bruno Haible * frame.c (find_fde): Correct FDE's upper bound. diff --git a/gcc/gengenrtl.c b/gcc/gengenrtl.c index c33d6fd2579..8104094936f 100644 --- a/gcc/gengenrtl.c +++ b/gcc/gengenrtl.c @@ -49,7 +49,8 @@ struct rtx_definition defs[] = const char *formats[NUM_RTX_CODE]; static const char * -type_from_format (char c) +type_from_format (c) + char c; { switch (c) { @@ -70,7 +71,8 @@ type_from_format (char c) } static const char * -accessor_from_format (char c) +accessor_from_format (c) + char c; { switch (c) { @@ -258,6 +260,23 @@ gencode (f) gendef (f, *fmt); } +#if defined(USE_C_ALLOCA) && !defined(__GNUC__) +char * +xmalloc (nbytes) + int nbytes; +{ + char *tmp = (char *) malloc (nbytes); + + if (!tmp) + { + fprintf (stderr, "can't allocate %d bytes (out of virtual memory)\n", nbytes); + exit (FATAL_EXIT_CODE); + } + + return tmp; +} +#endif /* USE_C_ALLOCA && !__GNUC__ */ + int main(argc, argv) int argc;