diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-01-17 20:09:09 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-01-17 20:09:09 +0000 |
commit | 55dc37980bc3fd232d26a0dcc34780fe1ee5f3e5 (patch) | |
tree | 054260ca4044a0fad183ad9383daabceeac97a58 /gcc/gengenrtl.c | |
parent | fa6212f1f07f1a0bb2e1a05aedde0edd8d318192 (diff) | |
download | gcc-55dc37980bc3fd232d26a0dcc34780fe1ee5f3e5.tar.gz |
* gengenrtl.c (type_from_format): De-ANSIfy function signature.
(accessor_from_format): Likewise.
(xmalloc): New function for use when linking with alloca.o.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@17386 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gengenrtl.c')
-rw-r--r-- | gcc/gengenrtl.c | 23 |
1 files changed, 21 insertions, 2 deletions
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; |