[lkml]   [2002]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: RFC: booleans and the kernel
On Thu Jan 24, 2002 at 12:42:58PM -0500, 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.

Agreed, bool is nicer. Out of curiosity, esp
wrt struct packing, how does gcc actully store
a bool? A single bit? A full 32-bit word?


Erik B. Andersen
--This message was written using 73% post-consumer electrons--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:15    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean