This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: fixincl.c - Several changes
- To: korbb at egcs dot cygnus dot com
- Subject: Re: fixincl.c - Several changes
- From: Rainer Orth <ro at TechFak dot Uni-Bielefeld dot DE>
- Date: 10 May 1999 17:52:52 +0200
- Cc: dje at watson dot ibm dot com, egcs-bugs at egcs dot cygnus dot com, egcs-patches at egcs dot cygnus dot com, ddsinc09 at ix dot netcom dot com
- References: <19990510151329.6351.qmail@egcs.cygnus.com>
> Some people may object to my indentation style,
> but something along these lines ought to work
> fix-headers.c(write_rbrac):
While I did complain that fixincl's indentation doesn't conform to the GNU
coding standards, this change has another problem (also found in fixincl)
which is worse:
> < if (!seen_EXIT_FAILURE)
> < fprintf (outf, "#define EXIT_FAILURE 1\n");
> < if (!seen_EXIT_SUCCESS)
> < fprintf (outf, "#define EXIT_SUCCESS 0\n");
> ---
> > if (!seen_EXIT_FAILURE)
> > fprintf (outf, "#ifndef EXIT_FAILURE\n"
> > "#define EXIT_FAILURE 1\n"
> > "#endif\n");
> > if (!seen_EXIT_SUCCESS)
> > fprintf (outf, "#ifndef EXIT_SUCCESS\n"
> > "#define EXIT_SUCCESS 0\n"
> > "#endif\n");
concatenation of string literals is an ANSI C feature and thus
inappropriate for use in fix-headers.c, since this file must be compiled by
the host compiler, which may be pre-ANSI. Please use one single string
constant, maybe \-newline separated, like the rest of fix-headers.c does.
Rainer