On 04/24/14 11:26, G M wrote:
> 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.

It seems that clang introduced those in a way that is incompatible with
both MSVC and GCC. I think they intend to be compatible with MSVC in
such cases, which would mean that those should be available as long as
one uses appropriate pragma, but declaration is still up to headers.
Anyway, we may #ifdef those on clang, but how can we do that? Is there
any builtin macro indicating that -fms-extension is used? Will
__has_builtin work for them?

Jacek

------------------------------------------------------------------------------
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