[cfe-dev] clang doesn't compile simple code

fprijate prijatelj.francek at gmail.com
Mon Apr 21 12:45:34 PDT 2014


Hi

Thanks Reid.
I tried it before and it actually works in this simple case.

The problem is that I have I big project with about 10000  files which
is portable and which compiles fine on many platforms
(win,linux,bsd,osx,android) with many compilers.

Before -fms-extensions I had a few errors in only one file 
(which i can solve with a few #ifdef tricks).

After I put globaly - CFLAGS +=-fms-extensions in my make file , I get
houndreds of errors in connection with intrinsics.
Like :
../intrin-impl.h:960:10: error: definition of builtin function
'_InterlockedExchangeAdd'
__LONG32 _InterlockedExchangeAdd(__LONG32 volatile *Addend, __LONG32 Value)
{

...

Of course I can make bigger changes in my build system or in my header
files.
But I think that main idea is that we will have on windows two clang
compilers.
One msvc compatible (name ,abi,  parameters ...) which will be replacement
for msvc compiler and
other mingw (gcc) compatible.

There are thousands of prejects which compile fine with gcc (mingw).
It would be a nice if they compile out of a box with clang (with maybe some
additional attribute).

regards
FranĨek




--
View this message in context: http://clang-developers.42468.n3.nabble.com/clang-doesn-t-compile-simple-code-tp4038903p4038924.html
Sent from the Clang Developers mailing list archive at Nabble.com.




More information about the cfe-dev mailing list