There are a lot of references on the web which relate __GNUC__ to GCC for compiler discovery (<http://sourceforge.net/apps/mediawiki/predef/index.php?title=Compilers#GCC_C.2FC.2B.2B>, <http://www.ocf.berkeley.edu/~pad/tigcc/doc/html/cpp_SEC15_GNUC.html>, etc). This translates into a fair number of cross-compiler projects with code like this:
#if defined(__GNUC__) // Do GCC things #elif defined(_MSC_VER) // Do MSVC things ... #endif This currently leads to problems when compiling with Clang because __GNUC__ (and friends) are always defined, even when compiling for MS compatibility (PR 11790). I've attached a patch which addresses this by only defining __GNUC__ et al when MSVC mode is not set. This means code like the above will work as expected. Thoughts? ~Aaron
GnuC.patch
Description: Binary data
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
