bool => int or char?
Jeremy Allison
jra at samba.org
Wed Nov 3 10:50:19 MDT 2010
On Wed, Nov 03, 2010 at 05:46:07PM +0100, Volker Lendecke wrote:
> On Wed, Nov 03, 2010 at 09:42:54AM -0700, Jeremy Allison wrote:
> > Ah, sizeof(bool) may be 1, but what does it get expanded
> > to when passed as an argument to a function ? Remember,
> > char -> int in C when passed as an arg.
>
> This happens for varargs style functions. I wouldn't bet on
> it for functions with prototypes.
No, it's in the C standard that lesser types get promoted
to int.
More information about the samba-technical
mailing list