Re: [PATCH] evaluate: sizeof(bool) could be larger than sizeof(char)

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

 



On Mon, Feb 18, 2019 at 10:30:53PM +0100, Luc Van Oostenryck wrote:
> The C standard doesn't require that the size of a _Bool is 1,
> its size is implementation defined.
> 
> However, in evaluate_sizeof() the assumption is made that
> a bool is the same size as a char.
> 
> Fix this wrong assumption by using the existing bits_in_bool.
> 
> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>

I seem to recall this going back and forth at some point in Sparse's
history, and that there were multiple places that assumed the size of a
bool, not just this. I don't remember the conclusion of that (or if
there was one), though.



[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