Don't redefine alignas in C++.
alignas in C++11 is a bit more flexible than
__attribute__((aligned(x))), and we already require C++11 in tests.
Change-Id: If61c35daa5fcaaca5119dcc6808a3e746befc170
Reviewed-on: https://boringssl-review.googlesource.com/29544
Reviewed-by: Adam Langley <agl@google.com>
diff --git a/crypto/internal.h b/crypto/internal.h
index 48bbae9..3dde476 100644
--- a/crypto/internal.h
+++ b/crypto/internal.h
@@ -116,6 +116,7 @@
#include <assert.h>
#include <string.h>
+#if !defined(__cplusplus)
#if defined(__GNUC__) && \
(__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 40800
// |alignas| and |alignof| were added in C11. GCC added support in version 4.8.
@@ -123,8 +124,7 @@
// reports support for C11.
#define alignas(x) __attribute__ ((aligned (x)))
#define alignof(x) __alignof__ (x)
-#elif !defined(__cplusplus)
-#if defined(_MSC_VER)
+#elif defined(_MSC_VER)
#define alignas(x) __declspec(align(x))
#define alignof __alignof
#else