Re: [RFC][PATCH] fix casting constant to _Bool

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 15, 2012 at 11:55 PM, Xi Wang <xi.wang@xxxxxxxxx> wrote:
> Casting to _Bool requires a zero test rather than truncation.

Ack. _Bool is very special (and rather non-C-like).

> BTW, this patch also disables the warning "cast truncates bits from
> constant value".  Does that sound good?

For cast to _Bool, that is correct. Since it doesn't truncate the
value, the upper bits are not ignored as they are with other casts.

               Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux