gcc/gcc/cp ChangeLog dump.c

Zack Weinberg zack@codesourcery.com
Fri Jan 24 20:13:00 GMT 2003


Nathanael Nerode <neroden@twcny.rr.com> writes:

> Where can I find this discussion?  I've been following the lists
> closely since the time the conversion to ISO C was suggested.  I
> remember nothing to the effect that "All changes to a function to make
> it conform to ISO C must be delayed, until they can change all
> conceptually boolean return types to bool".

To correct a widespread error of fact -

It is perfectly okay to have functions that must be K+R compatible
return bool (alias char).  The return type declaration is visible to
both K+R and ISO compilers, and K+R compilers will do the Right Thing
with them.

What does not work is to have a K+R compatible function with a 
FORMAL PARAMETER of type bool.  A K+R compiler will miscompile the
call site in that situation, since it does not know the types of the
arguments.

zw



More information about the Gcc-patches mailing list