Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/attributes-namespace6.C

raw
1 // PR c++/99318
2 // { dg-do compile { target c++11 } }
3
4 template <typename T>
5 struct S {
6 [[deprecated("foo")]] unsigned m_fn (char const chr)
7 {
8 using index_t = unsigned;
9 return T::arr[static_cast<index_t>(chr)]; // { dg-bogus "deprecated" }
10 }
11 };
12
13 extern unsigned int arr[];
14
15 struct R {
16 [[deprecated("foo")]] unsigned m_fn (char const chr)
17 {
18 using index_t = unsigned;
19 return arr[static_cast<index_t>(chr)]; // { dg-bogus "deprecated" }
20 }
21 };