lkml.org 
[lkml]   [2014]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V2] sparse: Allow override of sizeof(bool) warning
On Wed, Feb 26, 2014 at 07:42:37PM -0800, H. Peter Anvin wrote:
> sizeof(_Bool), like for many other types, is ABI-dependent, but that
> doesn't mean it is illegitimate.
>
> I don't think C99 says that it is invalid (which means C99 doesn't
> permit is to be a packed bitmap.)

Ok, but what can be said about the __pcpu_size_call() use case where we
do sizeof(bool)? We have there accessors for sizes 1,2,4 and 8. Can we
simply assume that the ABI will give us a size of bool which is one of
those?

What if sizeof(bool) is 3?

Or, are we saying that sizeof(bool) will always be of some natural,
native size like byte, short, int or long so we're good there?

Thanks.

--
Regards/Gruss,
Boris.

Sent from a fat crate under my desk. Formatting is fine.
--


\
 
 \ /
  Last update: 2014-02-27 10:01    [W:0.405 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site