summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2016-04-30 13:41:24 +0200
committerMax Kellermann <max@duempel.org>2016-04-30 13:41:24 +0200
commita6bf4746c600bc5b0f24cb94b251644fe9b74ea4 (patch)
tree037d899817cf2cea614f0abe0f32a0b4fba6d72f /test
parent72637d00e88a310ad7b7bca92dbeef6b55872f9b (diff)
test/test_byte_reverse: use gcc_alignas() for gcc<4.8 compatibility
Diffstat (limited to 'test')
-rw-r--r--test/test_byte_reverse.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/test_byte_reverse.cxx b/test/test_byte_reverse.cxx
index 321cc2e6c..d06a1595e 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[] alignas(uint16_t) = "123456";
+ static const char src[] gcc_alignas(uint16_t, 2) = "123456";
static const char result[] = "214365";
- static uint8_t dest[ARRAY_SIZE(src)] alignas(uint16_t);
+ static uint8_t dest[ARRAY_SIZE(src)] gcc_alignas(uint16_t, 2);
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[] alignas(uint32_t) = "12345678";
+ static const char src[] gcc_alignas(uint32_t, 4) = "12345678";
static const char result[] = "43218765";
- static uint8_t dest[ARRAY_SIZE(src)] alignas(uint32_t);
+ static uint8_t dest[ARRAY_SIZE(src)] gcc_alignas(uint32_t, 4);
reverse_bytes(dest, (const uint8_t *)src,
(const uint8_t *)(src + ARRAY_SIZE(src) - 1), 4);