[cfe-dev] How to use _Bool
eli.friedman at gmail.com
Fri Apr 20 11:48:37 PDT 2012
On Fri, Apr 20, 2012 at 3:32 AM, Jochen Wilhelmy
<jochen.wilhelmy at googlemail.com> wrote:
> 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++.
More information about the cfe-dev