aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ext/attr-unavailable-11.C
blob: fce24528908e036ad27db4c8a064ff13f2d9de1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// PR c++/104682
// { dg-do compile { target c++11 } }

template<typename>
struct S {
  enum B {
    A
  } __attribute__((unavailable)) ;
};

struct S2 {
  enum B {
    A
  } __attribute__((unavailable));
};

void
g ()
{
  S<int>::B a1; // { dg-error "is unavailable" }
  S2::B a2; // { dg-error "is unavailable" }
}