OpenCores
URL https://opencores.org/ocsvn/scarts/scarts/trunk

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [g++.dg/] [ext/] [attrib17.C] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
// { dg-do compile }
2
// Origin: Benjamin Kosnik 
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 struct StaticAssert;
17
template<> struct StaticAssert {};
18
 
19
StaticAssert<__alignof__(A) == __alignof__(B)> a1;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.