2014-04-24 11:45 GMT+02:00 Jacek Caban <ja...@codeweavers.com>:
> 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?
>
This bug report seems relevant:
http://llvm.org/bugs/show_bug.cgi?id=13283
Although it seems to only affect clang-cl (the cl.exe compatible
driver/part of Clang).
I would hazard a guess __has_builtin works for them as they are defined in
the same way as other builtins here:
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Builtins.def?revision=206362&view=markup
Ruben
------------------------------------------------------------------------------
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