[cfe-dev] How to use _Bool

Jochen Wilhelmy jochen.wilhelmy at googlemail.com
Fri Apr 20 03:32:39 PDT 2012


Hi!

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?

-Jochen




More information about the cfe-dev mailing list