summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/parse/attr3.C
blob: 848df055cedb9761bc91b4a203fdc99ce4a0f0c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// PR c++/39219

enum __attribute__ ((deprecated)) E { e };
struct S { enum __attribute__ ((deprecated)) F { f = e }; };

int main () {
    E x;	// { dg-warning "'E' is deprecated" "" }
    x = e;

    S::F y;	// { dg-warning "'F' is deprecated" "" }
    y = S::f;

    return x + y;
}