I\'ve run into this issue in the past: LLVM defines __GNUC__, but it can\'t consume a program GCC can. I\'m experiencing it again on Windows: LLVM defines _MSC_VER, but it c
It seems that clang now has an option for this. See the docs for clang:
-fgnuc-version=
This flag controls the value of GNUC and related macros. This flag does not enable or disable any GCC extensions implemented in Clang. Setting the version to zero causes Clang to leave GNUC and other GNU-namespaced macros, such as GXX_WEAK, undefined.
So to disable this behaviour, specify -fgnuc-version=0 on the clang commandline.