This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Mini-patch for cccp.c
- To: Thomas dot Koenig at ciw dot uni-karlsruhe dot de (Thomas König)
- Subject: Re: Mini-patch for cccp.c
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Mon, 06 Oct 1997 17:33:47 -0600
- cc: pkoning at xedia dot com (Paul Koning), egcs at cygnus dot com
- Reply-To: law at cygnus dot com
In message <199710011532.QAA30355@mvmap66.ciw.uni-karlsruhe.de>you write:
> If you look at finclude() in cccp.c, you'll find this code:
>
> static void
> finclude (f, inc, op, system_header_p, dirptr)
> int f;
> struct include_file *inc;
> FILE_BUF *op;
> int system_header_p;
>
> [...]
>
> FILE_BUF *fp;
>
> fp->system_header_p = system_header_p;
>
> Now, system_header_p has to be an int beause there might be a K&R
> compiler which, without prototypes, promotes a char to an int.
>
> fp->system_header_p is a char. Does this add to the clarity of the
> code?
Marginally, if at all.
> In another place, system_header_p is used not as a boolean, but as a
> small int, i.e. in do_line():
That's still OK. Using a char as a small int is fine as long as the code
doesn't depend on signedness.
jeff