This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: gcc/gcc/cp ChangeLog dump.c
- From: Zack Weinberg <zack at codesourcery dot com>
- To: Nathanael Nerode <neroden at twcny dot rr dot com>
- Cc: gcc-patches at gcc dot gnu dot org, gdr at integrable-solutions dot net
- Date: Fri, 24 Jan 2003 12:13:35 -0800
- Subject: Re: gcc/gcc/cp ChangeLog dump.c
- References: <3E318EFF.30207@twcny.rr.com>
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