Hi Everyone

I thought you might want to know that if I use clang 3.5 from trunk to
compile mingw's windows.h file like so:

// w3.cpp - no main even
#include <windows.h>
clang++ -fms-extensions w3.cpp

I get errors the errors shown below. I emailed one of the guys on the clang
team to ask what they thought was going on, they said they added some
intrinsics to clang for windows and this might be what is clashing now with
mingw's.

Note without the -fms-extensions the file will compile, so I assume mingw
might need it's intrinsics file updated to not define whichever of it's own
intrinsics where they will clash with whatever clang is providing when
-fms-extensions is on.

I'm using a mingw based on g++ 4.8.2. I forget where I downloaded my
version from but I intend to update to a 4.9 version when ever you release
that, so just try clang from trunk on a windows.h from your latest mingw
headers and see if the same happens for you too.

If you fix it or it's already fixed, if you post a link to wherever that
fixed version is, I'll try it.

Thanks

Here's the errors..

In file included from w3.cpp:1:
In file included from
c:\mingw\bin\..\lib\clang\3.5.0\../../../x86_64-w64-mingw32/include\windows.h:69:
In file included from
c:\mingw\bin\..\lib\clang\3.5.0\../../../x86_64-w64-mingw32/include\windef.h:8:
In file included from
c:\mingw\bin\..\lib\clang\3.5.0\../../../x86_64-w64-mingw32/include\minwindef.h:146:
In file included from
c:\mingw\bin\..\lib\clang\3.5.0\../../../x86_64-w64-mingw32/include\winnt.h:26:
c:\mingw\bin\..\lib\clang\3.5.0\../../../x86_64-w64-mingw32/include\psdk_inc/intrin-impl.h:960:10:
error: definition of
      builtin function '_InterlockedExchangeAdd'
__LONG32 _InterlockedExchangeAdd(__LONG32 volatile *Addend, __LONG32 Value)
{
         ^
c:\mingw\bin\..\lib\clang\3.5.0\../../../x86_64-w64-mingw32/include\psdk_inc/intrin-impl.h:969:10:
error: definition of
      builtin function '_InterlockedCompareExchange'
__LONG32 _InterlockedCompareExchange(__LONG32 volatile *Destination,
__LONG32 ExChange, __LONG32 Comperand) {
         ^
c:\mingw\bin\..\lib\clang\3.5.0\../../../x86_64-w64-mingw32/include\psdk_inc/intrin-impl.h:978:10:
error: definition of
      builtin function '_InterlockedIncrement'
__LONG32 _InterlockedIncrement(__LONG32 volatile *Addend) {
         ^
c:\mingw\bin\..\lib\clang\3.5.0\../../../x86_64-w64-mingw32/include\psdk_inc/intrin-impl.h:987:10:
error: definition of
      builtin function '_InterlockedDecrement'
__LONG32 _InterlockedDecrement(__LONG32 volatile *Addend) {
         ^
------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to