Re: [RFC PATCH] bits_in_bool should be 8

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

 



On Tue, Nov 15, 2016 at 4:50 AM, Jeff Layton <jlayton@xxxxxxxxxx> wrote:
> Given that we're working with byte-addressable machines, each type must
> be at least one byte in size or you'd not be able to take a pointer to
> it.
>
> Noticed at random when I ran the sample "compile" program in the
> sparse source tree vs. a test C program that uses bools. It crashes
> without this patch.

Do you have the test program to crash sparse?

Sparse should handle bool size correctly. The bits_in_bool is
a internal thing for sparse. From sizeof(bool) point of view,
sparse should treat sizeof(bool) as 8 bits. But bool has only
one bit usable value.

Chris
--
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