From 0629ed043ad8006ae2d88f8eb219e730f2e551aa Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Wed, 21 Apr 2021 13:41:35 -0400 Subject: Update compiler versions --- config_ver.h | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'config_ver.h') diff --git a/config_ver.h b/config_ver.h index 524b08fc..178eafea 100644 --- a/config_ver.h +++ b/config_ver.h @@ -58,12 +58,8 @@ # define CRYPTOPP_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) #endif -#if defined(__xlc__) || defined(__xlC__) -# define CRYPTOPP_XLC_VERSION ((__xlC__ / 256) * 10000 + (__xlC__ % 256) * 100) -#endif - -// Apple and LLVM's Clang. Apple Clang version 7.0 roughly equals LLVM Clang version 3.7 -// Also see https://gist.github.com/yamaya/2924292 +// Apple and LLVM Clang versions. Apple Clang version 7.0 roughly equals +// LLVM Clang version 3.7. Also see https://gist.github.com/yamaya/2924292 #if defined(__clang__) && defined(__apple_build_version__) # undef CRYPTOPP_GCC_VERSION # define CRYPTOPP_APPLE_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) @@ -72,7 +68,22 @@ # define CRYPTOPP_LLVM_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) #endif +// Clang pretends to be other compilers. The compiler gets into +// code paths that it cannot compile. Unset Clang to save the grief. +// Also see http://github.com/weidai11/cryptopp/issues/147. + +#if defined(__xlc__) || defined(__xlC__) +# undef CRYPTOPP_LLVM_CLANG_VERSION +# define CRYPTOPP_XLC_VERSION ((__xlC__ / 256) * 10000 + (__xlC__ % 256) * 100) +#endif + +#ifdef __INTEL_COMPILER +# undef CRYPTOPP_LLVM_CLANG_VERSION +# define CRYPTOPP_INTEL_VERSION (__INTEL_COMPILER) +#endif + #ifdef _MSC_VER +# undef CRYPTOPP_LLVM_CLANG_VERSION # define CRYPTOPP_MSC_VERSION (_MSC_VER) #endif -- cgit v1.2.1