repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
PR c++/56973, DR 696 - capture constant variables only as needed.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp1y
/
attributes-enum-1.C
blob
3bd1ba1929d9719eabd46bae45eb8552c9ec69cc
1
// PR c/47043
2
// { dg-do compile { target c++14 } }
3
4
class C
5
{
6
public:
7
enum Foo
8
{
9
T,
10
U [[deprecated("unused")]],
11
V
12
};
13
};
14
15
template<typename Tp>
16
class D
17
{
18
public:
19
enum Bar
20
{
21
X,
22
Y [[deprecated("unused")]],
23
Z
24
};
25
};
26
27
int
28
f (int i)
29
{
30
auto j = C::U; // { dg-warning ".U. is deprecated" }
31
32
auto k = D<int>::Y; // { dg-warning ".Y. is deprecated" }
33
34
return i;
35
}