Date: Fri, 27 May 2016 10:22:55 +0200 From: Hans Petter Selasky <hps@selasky.org> To: Konstantin Belousov <kostikbel@gmail.com> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r300718 - in head/sys: kern sys Message-ID: <ba1f536d-ab20-4771-1322-db02ad93aac8@selasky.org> In-Reply-To: <20160527081120.GJ38613@kib.kiev.ua> References: <201605260841.u4Q8ft9r045564@repo.freebsd.org> <20160526213716.GK58287@FreeBSD.org> <da70cbf0-4e4a-7050-f84b-25d00aad7b78@selasky.org> <20160527081120.GJ38613@kib.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
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. --HPS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ba1f536d-ab20-4771-1322-db02ad93aac8>