minor cleanups to commit as obvious
Kaveh R. Ghazi
ghazi@caip.rutgers.edu
Tue Sep 11 21:08:00 GMT 2001
> > Wasn't there a problem with returning bool for K&R compilers? I
> > remember some discussion but don't remember what policy was
> > decided to follow.
>
> I believe there is problem with passing bool, not returning it.
> Honza
Correct. But the problem isn't with K&R C, it's with strict c89
compilers which promote bool (char) to int in old style definitions
and cannot mix them with prototypes. E.g.
> extern void foo(char);
> void foo (c)
> char c;
> {
> }
doesn't work with all compilers. Since char is a backup for bool in
system.h, we can't use bool as a parameter either.
--
Kaveh R. Ghazi Engagement Manager / Project Services
ghazi@caip.rutgers.edu Qwest Internet Solutions
More information about the Gcc-patches
mailing list