This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: warning when bool parameter in function prototype
On Jan 16, 2003, Fergus Henderson <fjh@cs.mu.OZ.AU> wrote:
> On 16-Jan-2003, Jan Hubicka <jh@suse.cz> wrote:
>> For consistency please use int in both places.
>> SImply never use bool as function arguemnt.
> It would be nicer to have
> typedef int bool_param;
> and to use `bool_param' instead of using `int' directly.
> That way, you get the documentation value of knowing that
> the parameter represents a boolean rather than an integer.
And then, when we switch to C89, we can change a single typedef and
all the places where we wanted bool but had to use int due to lack of
prototypes would be fixed.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist Professional serial bug killer