Re: RFC: booleans and the kernel

Anton Altaparmakov
2002-01-24T18:22:40Z

At 17:42 24/01/02, Jeff Garzik wrote:
>A small issue...
>
>C99 introduced _Bool as a builtin type. The gcc patch for it went into
>cvs around Dec 2000. Any objections to propagating this type and usage
>of 'true' and 'false' around the kernel?
>
>Where variables are truly boolean use of a bool type makes the
>intentions of the code more clear. And it also gives the compiler a
>slightly better chance to optimize code [I suspect].
>
>Actually I prefer 'bool' to '_Bool', if this becomes a kernel standard.

I would be in favour of this as it does make code more readable. I use it
in ntfs tng quite a bit (but I just typedef a BOOL type myself).

If it is added, then _please_ don't use '_Bool', that's just sick...
'bool', heck even 'BOOL' would be better than that!

Best regards,

Anton

--
"I've not lost my mind. It's backed up on tape somewhere." - Unknown
--
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Linux NTFS Maintainer / WWW: http://linux-ntfs.sf.net/
ICQ: 8561279 / WWW: http://www-stu.christs.cam.ac.uk/~aia21/