summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/gencheck.c
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>1999-10-16 06:09:09 +0000
committerobrien <obrien@FreeBSD.org>1999-10-16 06:09:09 +0000
commitcae8fa8120c70195f34a2456f18c4c848a2d3e0c (patch)
treef7d3a3ab9c32694206552e767626366f016f2062 /contrib/gcc/gencheck.c
parent84656b55b6e25e30322dc903a05de53706361d3d (diff)
downloadFreeBSD-src-cae8fa8120c70195f34a2456f18c4c848a2d3e0c.zip
FreeBSD-src-cae8fa8120c70195f34a2456f18c4c848a2d3e0c.tar.gz
Virgin import of the GCC 2.95.1 compilers
Diffstat (limited to 'contrib/gcc/gencheck.c')
-rw-r--r--contrib/gcc/gencheck.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/contrib/gcc/gencheck.c b/contrib/gcc/gencheck.c
index f7548ce..80d7c4f 100644
--- a/contrib/gcc/gencheck.c
+++ b/contrib/gcc/gencheck.c
@@ -23,8 +23,9 @@ Boston, MA 02111-1307, USA. */
#define DEFTREECODE(SYM, NAME, TYPE, LEN) STRINGIFY(SYM),
-char *tree_codes[] = {
+const char *tree_codes[] = {
#include "tree.def"
+#include "gencheck.h"
(char*)0
};
@@ -35,7 +36,7 @@ void usage ()
int main (argc, argv)
int argc;
- char *argv[];
+ char *argv[] ATTRIBUTE_UNUSED;
{
int i;
@@ -61,22 +62,23 @@ int main (argc, argv)
return 0;
}
-#if defined(USE_C_ALLOCA) && !defined(__GNUC__)
+#if defined(USE_C_ALLOCA)
/* FIXME: We only need an xmalloc definition because we are forced to
link with alloca.o on some platforms. This should go away if/when
we link against libiberty.a. (ghazi@caip.rutgers.edu 6/3/98) */
-char *
+PTR
xmalloc (nbytes)
- int nbytes;
+ size_t nbytes;
{
- char *tmp = (char *) malloc (nbytes);
+ register PTR tmp = (PTR) malloc (nbytes);
if (!tmp)
{
- fprintf (stderr, "can't allocate %d bytes (out of virtual memory)\n", nbytes);
+ fprintf (stderr, "can't allocate %d bytes (out of virtual memory)\n",
+ nbytes);
exit (FATAL_EXIT_CODE);
}
return tmp;
}
-#endif /* USE_C_ALLOCA && !__GNUC__ */
+#endif /* USE_C_ALLOCA */
OpenPOWER on IntegriCloud