diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ccca9c5567fd..930924e74138 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 c33d6fd25790..8104094936fa 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;