<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Dec 22, 2013, at 6:37 PM, Alp Toker <<a href="mailto:alp@nuanti.com">alp@nuanti.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br>On 23/12/2013 00:46, Marshall Clow wrote:<br><blockquote type="cite">On Dec 22, 2013, at 1:58 PM, Alp Toker <<a href="mailto:alp@nuanti.com">alp@nuanti.com</a> <<a href="mailto:alp@nuanti.com">mailto:alp@nuanti.com</a>>> wrote:<br><br><blockquote type="cite">On 22/12/2013 21:27, Dimitry Andric wrote:<br><blockquote type="cite">Hi,<br><br>I ran into a situation where a C++ program was compiled with -Wsystem-headers.  When I did this with clang 3.4 or trunk, I got the following keyword warnings:<br></blockquote>[snipped]<br><blockquote type="cite">include/type_traits:668:8: warning: keyword '__is_unsigned' will be made available as an identifier for the remainder of the translation unit [-Wkeyword-compat]<br>struct __is_unsigned : public ___is_unsigned<_Tp> {};<br>     ^<br>9 warnings generated.<br><br>This seems to have been introduced with r196212 in clang by Alp Toker, but it is unfortunate the warning hits libc++. :-)  The cause is a bunch of Embarcadero keywords defined in clang's lib/Parse/ParseExpr.cpp, which are exactly the same as these libc++-internal identifers.<br><br>Is the attached patch acceptable as a workaround?</blockquote></blockquote></blockquote></div></blockquote><br></div><div>I’m still confused.</div><div>I tried the following tests using today’s clang (and libc++):</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">      </span>int main () { const int i = __is_void<int>::value; }</div><div>fails to compile.</div><div><br></div><div><div><span class="Apple-tab-span" style="white-space: pre;">     </span>int main () { const int i = std::__is_void<int>::value; }</div><div>fails to compile.</div></div><div><br></div><div><div><span class="Apple-tab-span" style="white-space: pre;">    </span>#include <type_traits></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>int main () { const int i = __is_void<int>::value; }</div><div>fails to compile.</div></div><div><br></div><div><div><div><span class="Apple-tab-span" style="white-space: pre;">      </span>#include <type_traits></div><div><span class="Apple-tab-span" style="white-space: pre;">       </span>int main () { const int i = std::__is_void<int>::value; }</div><div>compiles successfully.</div></div></div><div><br></div><div>All were compiled with "-std=c++11 -stdlib=libc++”</div><div>If I add -Wsystem-headers to the final one, I get warnings like what Dimitry reported. </div><div><br></div><div>— Marshall</div><div><br></div><div><br></div><div><br></div><div><br></div></body></html>