<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 20 May 2018 at 06:05, Jim Pryor via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">These builtins are mentioned in the docs and seem to be honored (I'm compiling in C with --std=c99) but `__has_builtin(__builtin_<wbr>choose_expr)` returns 0, and similarly for `__builtin_types_compatible_p`<wbr>. Can someone on this list explain why?<br>
<br>
Should I expect `__has_builtin` to have other false negatives too?<br>
<br>
Does the issue have anything to do with these functions being declared as keywords in include/clang/Basic/<wbr>TokenKinds.def?<br>
<br>
I'm not subscribed to the list, so I'd welcome being cc'd on any replies. Thanks.</blockquote><div><br></div><div>Status quo: __has_builtin tests for the existence of a builtin function. __builtin_choose_expr and __builtin_types_compatible_p aren't functions, so __has_builtin can't be used to test for them.</div><div><br></div><div>Last time this was brought up, I seem to recall that there was largely consensus that we should also report the existence of non-function builtins through __has_builtin, but I don't think anyone actually put together a patch to implement that. Are you interested in doing so?</div></div></div></div>