Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/friend8.C

raw
1 // PR c++/100596
2 // { dg-do compile { target c++11 } }
3
4 struct A
5 {
6 __attribute((deprecated)) friend void f(A); // part of A API, definition in .C
7 [[deprecated]] friend void f2(A); // { dg-warning "ignored" }
8 };
9
10 int main()
11 {
12 A a;
13 f(a); // { dg-warning "is deprecated" }
14 f2(a);
15 }