/* Generate check macros for tree codes.
- Copyright (C) 1998 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of GNU CC.
#define DEFTREECODE(SYM, NAME, TYPE, LEN) STRINGIFY(SYM),
-char *tree_codes[] = {
+const char *tree_codes[] = {
#include "tree.def"
+#include "c-common.def"
#include "gencheck.h"
(char*)0
};
-void usage ()
+static void usage PARAMS ((void));
+
+static void
+usage ()
{
fprintf (stderr,"Usage: gencheck\n");
}
-int main (argc, argv)
+extern int main PARAMS ((int, char **));
+
+int
+main (argc, argv)
int argc;
- char *argv[] ATTRIBUTE_UNUSED;
+ char **argv ATTRIBUTE_UNUSED;
{
int i;
default:
usage ();
- exit (1);
+ return (1);
}
printf ("/* This file is generated using gencheck. Do not edit. */\n");
{
printf ("#define %s_CHECK(t)\tTREE_CHECK (t, %s)\n",
tree_codes[i], tree_codes[i]);
- printf ("#define %s_CHECK1(t)\tTREE_CHECK1 (t, %s)\n",
- tree_codes[i], tree_codes[i]);
}
return 0;
/* 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)
{