From 2e74fdaa4a847a6ed2d89f57eaf9936e05bd5169 Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Mon, 2 Jul 2018 15:14:45 -0400 Subject: [PATCH] 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 --- crypto/internal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/internal.h b/crypto/internal.h index 48bbae9c6..3dde47621 100644 --- a/crypto/internal.h +++ b/crypto/internal.h @@ -116,6 +116,7 @@ #include #include +#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