[cfe-dev] Clang-cl.exe and the VC++ preprocessor
Jonathan 'Rynn' Sauer
jonathan.sauer at gmx.de
Fri Jul 11 10:59:30 PDT 2014
Hello,
> ... explicitly shoots itself in the foot:
>
> # if defined _MSC_VER && _MSC_VER >= 1400 && !(defined __EDG__ || defined __GCCXML__ || defined __CUDACC__ || defined __PATHSCALE__ || defined __clang__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || defined __SUNPRO_CC || defined __HP_aCC || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI)
> # define BOOST_PP_VARIADICS_MSVC 1
> # endif
>
> I'm not sure what that list of compilers is for (if _MSC_VER is defined, why don't you assume the compiler acts like MSC?), but removing "|| defined __clang__" from the list should fix the issue.
In boost 1.55's select_compiler_config.hpp there is:
#elif defined _MSC_VER
// Microsoft Visual C++
//
// Must remain the last #elif since some other vendors (Metrowerks, for
// example) also #define _MSC_VER
# define BOOST_COMPILER_CONFIG "boost/config/compiler/visualc.hpp"
I guess the check you quoted tries to make sure it works correctly even when any of the other compilers
supported by boost also defines _MSC_VER (while not acting like MSVC).
Jonathan
More information about the cfe-dev
mailing list