diff options
author | Zack Weinberg <zackw@stanford.edu> | 2001-04-02 16:29:32 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2001-04-02 16:29:32 +0000 |
commit | 0313e85b82d26887adb3cdab1dd8ce0a135135a3 (patch) | |
tree | 113af7fdc2e163e99c91162b13799deeae6fdb8d /gcc/gencheck.c | |
parent | 79cb7361fad4c4b58a09c1f6e64cf81c3cf9b8dc (diff) | |
download | gcc-0313e85b82d26887adb3cdab1dd8ce0a135135a3.tar.gz |
genattr.c, [...]: Wrap generated header in multiple-include guard.
* genattr.c, gencheck.c, gencodes.c, genconfig.c, genflags.c,
gengenrtl.c: Wrap generated header in multiple-include guard.
Improve error checking.
From-SVN: r41006
Diffstat (limited to 'gcc/gencheck.c')
-rw-r--r-- | gcc/gencheck.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/gencheck.c b/gcc/gencheck.c index bfd8c366d66..c55048aa6f8 100644 --- a/gcc/gencheck.c +++ b/gcc/gencheck.c @@ -35,7 +35,7 @@ static void usage PARAMS ((void)); static void usage () { - fprintf (stderr,"Usage: gencheck\n"); + fputs ("Usage: gencheck\n", stderr); } extern int main PARAMS ((int, char **)); @@ -57,13 +57,17 @@ main (argc, argv) return (1); } - printf ("/* This file is generated using gencheck. Do not edit. */\n"); + puts ("/* This file is generated using gencheck. Do not edit. */\n"); + puts ("#ifndef GCC_TREE_CHECK_H"); + puts ("#define GCC_TREE_CHECK_H\n"); + for (i = 0; tree_codes[i]; i++) { printf ("#define %s_CHECK(t)\tTREE_CHECK (t, %s)\n", tree_codes[i], tree_codes[i]); } + puts ("\n#endif /* GCC_TREE_CHECK_H */"); return 0; } |