Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/cpp0x/alignas1.C @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 // PR c++/65734 | |
2 // { dg-do compile { target c++11 } } | |
3 | |
4 template <class T> struct A | |
5 { | |
6 T t; | |
7 }; | |
8 | |
9 typedef A<int> T[4] alignas (2 * alignof (int)); | |
10 A<int> a[4]; | |
11 | |
12 typedef A<char> T2[4] alignas (2 * alignof (int)); | |
13 | |
14 #define SA(X) static_assert((X),#X) | |
15 SA(alignof (T) == 2 * alignof(int)); | |
16 SA(alignof (T2) == 2 * alignof(int)); |