[racket-dev] ffi sizeof bool

From: Tobias Hammer (tobias.hammer at dlr.de)
Date: Fri Apr 4 02:56:18 EDT 2014

Hi,

i guess this shouldn't happen:

$ cat s.cc
#include <stdio.h>
int main()
{
     printf("%zu\n", sizeof(bool));
}
$ g++ s.cc -o s
$ ./s
1

Welcome to Racket v6.0.0.5.
-> (require ffi/unsafe)
-> (ctype-sizeof _bool)
4

Tested with multiple unix/linux OS, all gcc > 4.3.4

Tobias

Posted on the dev mailing list.