Debian Codegraph @

gcc/testsuite/g++.dg/diagnostic/friend3.C

raw
1 // { dg-do compile }
2
3 void
4 fn ()
5 {
6 struct S {
7 friend void bar () { } // { dg-error "17:cannot define friend function 'bar' in a local class definition" }
8 };
9 }