Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/ext/attrib17.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 // { dg-do compile } |
2 // Origin: Benjamin Kosnik <bkoz at gcc dot gnu dot org> | |
3 // PR c++/17743: Attributes applied to typedefs. | |
4 | |
5 struct A { | |
6 typedef char layout_type[sizeof(double)] | |
7 __attribute__((aligned(__alignof__(double)))); | |
8 layout_type data; | |
9 }; | |
10 | |
11 struct B { | |
12 typedef char layout_type[sizeof(double)]; | |
13 layout_type data __attribute__((aligned(__alignof__(double)))); | |
14 }; | |
15 | |
16 template<bool> struct StaticAssert; | |
17 template<> struct StaticAssert<true> {}; | |
18 | |
19 StaticAssert<__alignof__(A) == __alignof__(B)> a1; |