<br><br><div class="gmail_quote">On Tue, Sep 27, 2011 at 4:16 PM, Douglas Gregor <span dir="ltr"><<a href="mailto:dgregor@apple.com">dgregor@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
On Sep 27, 2011, at 3:48 PM, Eli Friedman wrote:<br>
<br>
> On Tue, Sep 27, 2011 at 3:38 PM, Douglas Gregor <<a href="mailto:dgregor@apple.com">dgregor@apple.com</a>> wrote:<br>
>> Author: dgregor<br>
>> Date: Tue Sep 27 17:38:19 2011<br>
>> New Revision: 140650<br>
>><br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=140650&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=140650&view=rev</a><br>
>> Log:<br>
>> When 'bool' is not a built-in type but is defined as a macro, print<br>
>> 'bool' rather than '_Bool' within types, to make things a bit more<br>
>> readable. Fixes <rdar://problem/10063263>.<br>
><br>
> Is it actually safe to assume that bool is defined to _Bool?  It's<br>
> probably not hard to find code that has constructs like "#define bool<br>
> int"...<br>
<br>
</div>*sigh*<br>
<br>
You are right, of course. I'm working on threading this through.<br></blockquote><div><br></div><div>When is bool not a builtin type but defined as a macro? C? At least in C99 it's well defined, but I suppose C99's not exactly universally adopted.</div>
<div><br></div><div>Anyway, my point was to draw a comparison between this and the NULL macro - which we seem to assume is actually the real implementation provided NULL macro (& suggest it for null pointers in C++03 if it's defined in a TU). I suppose NULL exists in the standards of all languages clang supports whereas bool exists in all except the pre-C99 variants, which leaves us open to needing to support alternative definitions?</div>
<div><br></div><div>- David </div></div>