<div dir="ltr">I would expect clang to define __GNUC__ when targetting mingw.  Also, that bit of Compiler.h should use __has_attribute().  Not sure how I missed it.</div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Fri, Aug 16, 2013 at 10:42 AM, Aaron Ballman <span dir="ltr"><<a href="mailto:aaron@aaronballman.com" target="_blank">aaron@aaronballman.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Clang does support __attribute__((noreturn)), so I don't see the harm<br>
in that.  Would you like to make the change?<br>
<span class="HOEnZb"><font color="#888888"><br>
~Aaron<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Fri, Aug 16, 2013 at 1:35 PM, Matt Beaumont-Gay <<a href="mailto:matthewbg@google.com">matthewbg@google.com</a>> wrote:<br>
> On Thu, Aug 15, 2013 at 7:50 PM, Aaron Ballman <<a href="mailto:aaron@aaronballman.com">aaron@aaronballman.com</a>> wrote:<br>
>> On Thu, Aug 15, 2013 at 10:46 PM, Matt Beaumont-Gay<br>
>> <<a href="mailto:matthewbg@google.com">matthewbg@google.com</a>> wrote:<br>
>>> On Thu, Aug 15, 2013 at 6:43 PM, Aaron Ballman <<a href="mailto:aaron@aaronballman.com">aaron@aaronballman.com</a>> wrote:<br>
>>>> Author: aaronballman<br>
>>>> Date: Thu Aug 15 20:43:31 2013<br>
>>>> New Revision: 188524<br>
>>>><br>
>>>> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=188524&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=188524&view=rev</a><br>
>>>> Log:<br>
>>>> Fixing a warning about control reaching the end of a non-void function.<br>
>>>><br>
>>>> Modified:<br>
>>>>     llvm/trunk/utils/TableGen/CodeGenInstruction.cpp<br>
>>>><br>
>>>> Modified: llvm/trunk/utils/TableGen/CodeGenInstruction.cpp<br>
>>>> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenInstruction.cpp?rev=188524&r1=188523&r2=188524&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenInstruction.cpp?rev=188524&r1=188523&r2=188524&view=diff</a><br>

>>>> ==============================================================================<br>
>>>> --- llvm/trunk/utils/TableGen/CodeGenInstruction.cpp (original)<br>
>>>> +++ llvm/trunk/utils/TableGen/CodeGenInstruction.cpp Thu Aug 15 20:43:31 2013<br>
>>>> @@ -192,6 +192,7 @@ CGIOperandList::ParseOperandName(const s<br>
>>>><br>
>>>>    // Otherwise, didn't find it!<br>
>>>>    PrintFatalError(TheDef->getName() + ": unknown suboperand name in '" + Op + "'");<br>
>>>> +  return std::make_pair(0U, 0U);<br>
>>><br>
>>> PrintFatalError is marked noreturn; what compiler complained about this?<br>
>><br>
>> clang-x86_64-darwin11-self-mingw32<br>
><br>
> From Compiler.h:<br>
><br>
> #ifdef __GNUC__<br>
> #define LLVM_ATTRIBUTE_NORETURN __attribute__((noreturn))<br>
> #elif defined(_MSC_VER)<br>
> #define LLVM_ATTRIBUTE_NORETURN __declspec(noreturn)<br>
> #else<br>
> #define LLVM_ATTRIBUTE_NORETURN<br>
> #endif<br>
><br>
> From InitPreprocessor.cpp:<br>
><br>
>   if (!LangOpts.MicrosoftMode) {<br>
>     // Currently claim to be compatible with GCC 4.2.1-5621, but only if we're<br>
>     // not compiling for MSVC compatibility<br>
>     Builder.defineMacro("__GNUC_MINOR__", "2");<br>
>     Builder.defineMacro("__GNUC_PATCHLEVEL__", "1");<br>
>     Builder.defineMacro("__GNUC__", "4");<br>
>     Builder.defineMacro("__GXX_ABI_VERSION", "1002");<br>
>   }<br>
><br>
> Maybe the first condition for LLVM_ATTRIBUTE_NORETURN should be "#if<br>
> defined(__GNUC__) || defined(__clang__)"?<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br></div>