<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Thu, Jul 13, 2017 at 9:18 AM David Chisnall via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 13 Jul 2017, at 17:07, Stephan Bergmann via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>> wrote:<br>
><br>
> From a quick look at the code of both GCC and Clang, I assume the difference is due to GCC implicitly assuming /usr/include/assert.h to be a system header (so it suppresses the pedantic warning there), while Clang does not.  (Curiously, while many of the libstdc++ files in /usr/include/c++/... have<br>
<br>
I believe that this is a known issue, where the warning suppression for macros happens based on the instantiation location, not on the declaration location.  You are getting the warning because the file in which you instantiate the macro is not a system header, even though the macro is defined in a system header.<br></blockquote><div><br>Not always the case - Clang looks at where a macro is defined in many cases, I think - though I could be wrong. Maybe this one hasn't been adjusted yet.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
David<br>
<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div></div>