Just checked and _Bool is also 1 byte, same as C++. What i don't understand yet is to which standard does the current _bool conform? I couldn't find any platform with int sized bool.

On Fri, 04 Apr 2014 17:10:30 +0200, Matthew Flatt <mfl...@cs.utah.edu> wrote:

Yes, `_bool` is a problem. I'll add a `_stdbool` that corresponds to
`bool` from C99's <stdbool.h>, which I imagine must be the same as
`bool` in C++.

At Fri, 4 Apr 2014 08:56:18 +0200, Tobias Hammer wrote:
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
_________________________
  Racket Developers list:
  http://lists.racket-lang.org/dev


--
Tobias Hammer
DLR / Robotics and Mechatronics Center (RMC)
Muenchner Str. 20, D-82234 Wessling
Tel.: 08153/28-1487
Mail: tobias.ham...@dlr.de
_________________________
 Racket Developers list:
 http://lists.racket-lang.org/dev

Reply via email to