How to use _Bool


when using _Bool I get the following error:
error: unknown type name '_Bool'

I use clang 3.0 as a library. my langOptions are the following:

langOptions.Bool = 1;
langOptions.CPlusPlus = 1;
langOptions.RTTI = 0;
langOptions.AltiVec = 1;
langOptions.Freestanding = 1; // no magic for main

It was recommendet to me to use _Bool instead of bool so that clang uses i1 instead
of i8 for boolean variables when generating code.
What do I have to do that clang knows about _Bool?


"_Bool" is a C-only thing; use "bool" in C++.


Note that in C99, bool should expand to _Bool (if you include a C compliant stdbool.h header), so it should not make any difference if you use one or the other.

-- Jean-Daniel