diff --git a/src/Compiler.h b/src/Compiler.h index af82cc107..9e6728b62 100644 --- a/src/Compiler.h +++ b/src/Compiler.h @@ -160,14 +160,6 @@ #define gcc_restrict #endif -/* C++11 features */ - -#if defined(__cplusplus) - -#define gcc_alignas(T, fallback) alignas(T) - -#endif - #ifndef __has_feature // define dummy macro for non-clang compilers #define __has_feature(x) 0 diff --git a/src/util/Manual.hxx b/src/util/Manual.hxx index 115f2e7bd..9e9704178 100644 --- a/src/util/Manual.hxx +++ b/src/util/Manual.hxx @@ -50,7 +50,7 @@ */ template class Manual { - gcc_alignas(T, 8) + alignas(T) char data[sizeof(T)]; #ifndef NDEBUG diff --git a/test/test_byte_reverse.cxx b/test/test_byte_reverse.cxx index ca4380fc8..77523ca33 100644 --- a/test/test_byte_reverse.cxx +++ b/test/test_byte_reverse.cxx @@ -49,9 +49,9 @@ CPPUNIT_TEST_SUITE_REGISTRATION(ByteReverseTest); void ByteReverseTest::TestByteReverse2() { - static const char src[] gcc_alignas(uint16_t, 2) = "123456"; + static const char src[] alignas(uint16_t) = "123456"; static const char result[] = "214365"; - static uint8_t dest[ARRAY_SIZE(src)] gcc_alignas(uint16_t, 2); + static uint8_t dest[ARRAY_SIZE(src)] alignas(uint16_t); reverse_bytes(dest, (const uint8_t *)src, (const uint8_t *)(src + ARRAY_SIZE(src) - 1), 2); @@ -73,9 +73,9 @@ ByteReverseTest::TestByteReverse3() void ByteReverseTest::TestByteReverse4() { - static const char src[] gcc_alignas(uint32_t, 4) = "12345678"; + static const char src[] alignas(uint32_t) = "12345678"; static const char result[] = "43218765"; - static uint8_t dest[ARRAY_SIZE(src)] gcc_alignas(uint32_t, 4); + static uint8_t dest[ARRAY_SIZE(src)] alignas(uint32_t); reverse_bytes(dest, (const uint8_t *)src, (const uint8_t *)(src + ARRAY_SIZE(src) - 1), 4);