This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: fixincl.c - Several changes



> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]