fixincl.c - Several changes

Rainer Orth ro@TechFak.Uni-Bielefeld.DE
Mon May 31 21:06:00 GMT 1999

> 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.


More information about the Gcc-bugs mailing list