From 0414faff8e1ebf2002b5304b12a3dcb50c5e5473 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Tue, 7 Jun 2016 15:22:11 -0400 Subject: [PATCH] Revert "Add hack to pickup C++11 alignas" This reverts commit 16df6e64a8d026d3369b2fc93572fce7505a9cef. Detailed testing is revealing some fractures. The pain point seems to be C++11 is more strict about the location of the 'alignas(N)' in the statement-expression. Some compilers accept a looser grammar; while others do not. Clang 3.3 is rejecting some of the statements with CRYPTOPP_ALIGN_DATA(N). Others may do the same, and we need to look at ICC in particular. --- config.h | 6 ------ config.recommend | 6 ------ 2 files changed, 12 deletions(-) diff --git a/config.h b/config.h index d502437d..486534d6 100644 --- a/config.h +++ b/config.h @@ -829,12 +829,6 @@ NAMESPACE_END # define CRYPTOPP_NO_THROW #endif // CRYPTOPP_CXX11_NOEXCEPT -// Hack... CRYPTOPP_ALIGN_DATA is defined earlier, before C++11 alignas availability is determined -#if defined(CRYPTOPP_CXX11_ALIGNAS) -# undef CRYPTOPP_ALIGN_DATA -# define CRYPTOPP_ALIGN_DATA(x) alignas(x) -#endif // CRYPTOPP_CXX11_ALIGNAS - // OK to comment the following out, but please report it so we can fix it. #if (defined(__cplusplus) && (__cplusplus >= 199711L)) && !defined(CRYPTOPP_UNCAUGHT_EXCEPTION_AVAILABLE) # error "std::uncaught_exception is not available. This is likely a configuration error." diff --git a/config.recommend b/config.recommend index be30f54d..66421a73 100644 --- a/config.recommend +++ b/config.recommend @@ -827,12 +827,6 @@ NAMESPACE_END # define CRYPTOPP_NO_THROW #endif // CRYPTOPP_CXX11_NOEXCEPT -// Hack... CRYPTOPP_ALIGN_DATA is defined earlier, before C++11 alignas availability is determined -#if defined(CRYPTOPP_CXX11_ALIGNAS) -# undef CRYPTOPP_ALIGN_DATA -# define CRYPTOPP_ALIGN_DATA(x) alignas(x) -#endif // CRYPTOPP_CXX11_ALIGNAS - // OK to comment the following out, but please report it so we can fix it. #if (defined(__cplusplus) && (__cplusplus >= 199711L)) && !defined(CRYPTOPP_UNCAUGHT_EXCEPTION_AVAILABLE) # error "std::uncaught_exception is not available. This is likely a configuration error."