aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/other/anon-union3.C
blob: 94d0aecaf03e4e0a7fddd98764e8d3f57db6da84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// PR c++/32054

class C
{
  auto union      // { dg-error "storage class" "" { target { ! c++11 } } }
    {
      int a;
    };            // { dg-error "multiple|specified" "" { target c++11 } }
  register union  // { dg-error "storage class" }
    {
      int b;
    };
  static union    // { dg-error "storage class" }
    {
      int c;
    };
  extern union    // { dg-error "storage class" }
    {
      int d;
    };
  mutable union   // { dg-error "storage class" }
    {
      int e;
    };
};