<div dir="ltr">We already define __declspec for mingw compatibility, so adding the ccs seems reasonable.<div><br></div><div>I'm curious if you can fix most of your errors with -fms-extensions by dropping your intrin-impl.h header and including clang's intrin.h instead.  You'll have to hack out the _MSC_VER ifdef there.  If that works, it might be worth making clang's intrin.h header available when targeting mingw.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Apr 21, 2014 at 12:45 PM, fprijate <span dir="ltr"><<a href="mailto:prijatelj.francek@gmail.com" target="_blank">prijatelj.francek@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi<br>
<br>
Thanks Reid.<br>
I tried it before and it actually works in this simple case.<br>
<br>
The problem is that I have I big project with about 10000  files which<br>
is portable and which compiles fine on many platforms<br>
(win,linux,bsd,osx,android) with many compilers.<br>
<br>
Before -fms-extensions I had a few errors in only one file<br>
(which i can solve with a few #ifdef tricks).<br>
<br>
After I put globaly - CFLAGS +=-fms-extensions in my make file , I get<br>
houndreds of errors in connection with intrinsics.<br>
Like :<br>
../intrin-impl.h:960:10: error: definition of builtin function<br>
'_InterlockedExchangeAdd'<br>
__LONG32 _InterlockedExchangeAdd(__LONG32 volatile *Addend, __LONG32 Value)<br>
{<br>
<br>
...<br>
<br>
Of course I can make bigger changes in my build system or in my header<br>
files.<br>
But I think that main idea is that we will have on windows two clang<br>
compilers.<br>
One msvc compatible (name ,abi,  parameters ...) which will be replacement<br>
for msvc compiler and<br>
other mingw (gcc) compatible.<br>
<br>
There are thousands of prejects which compile fine with gcc (mingw).<br>
It would be a nice if they compile out of a box with clang (with maybe some<br>
additional attribute).<br>
<br>
regards<br>
Franček<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://clang-developers.42468.n3.nabble.com/clang-doesn-t-compile-simple-code-tp4038903p4038924.html" target="_blank">http://clang-developers.42468.n3.nabble.com/clang-doesn-t-compile-simple-code-tp4038903p4038924.html</a><br>

<div class="HOEnZb"><div class="h5">Sent from the Clang Developers mailing list archive at Nabble.com.<br>
<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</div></div></blockquote></div><br></div>