svn commit: r300718 - in head/sys: kern sys
Konstantin Belousov
kostikbel at gmail.com
Fri May 27 08:37:40 UTC 2016
On Fri, May 27, 2016 at 10:22:55AM +0200, Hans Petter Selasky wrote:
> On 05/27/16 10:11, Konstantin Belousov wrote:
> > On Fri, May 27, 2016 at 09:42:24AM +0200, Hans Petter Selasky wrote:
> >> We cannot use the "bool" type in userspace at least, because
> >> sizeof(bool) depends on the compiler. So the interface must use an
> >> integer type at least, possibly uint8_t like now.
> >
> > What do you mean ? There are ABIs, and we expect all used compilers to
> > follow common arch ABI. Old psABIs date back to time where _Bool
> > did not existed yet, but now it is ubiquitious. E.g. both i386 and
> > amd64 require _Bool have a representation by single byte, with the
> > byte alignment.
> >
> > Can you give exact examples of the inconsistencies, on any platform,
> > regardless of our tier ?
> >
>
> Hi,
>
> I was reading this article:
> http://stackoverflow.com/questions/4897844/is-sizeofbool-defined
>
> And is says:
> sizeof(bool) is not required to be 1.
It is clear that the answers you referenced talk about requirements
of the C standard.
More information about the svn-src-all
mailing list