Debian Codegraph @

gcc/testsuite/g++.dg/warn/Wmissing-declarations-1.C

raw
1 // { dg-options "-Wmissing-declarations" }
2
3 void fn1() { } // { dg-warning "no previous declaration" }
4 namespace ns {
5 void fn2() { } // { dg-warning "no previous declaration" }
6 }
7 namespace {
8 void fn3() { }
9 }
10 static void fn4() { }
11
12 void fn5();
13 namespace ns {
14 void fn6();
15 }
16
17 void fn5() { }
18 namespace ns {
19 void fn6() { }
20 }
21
22 inline void fn7() { }
23
24 class c {
25 void cfn1() { }
26 static void cfn2() { }
27 void cfn3();
28 static void cfn4();
29 };
30
31 void c::cfn3() { }
32 void c::cfn4() { }
33
34 static struct {
35 void sfn1() { }
36 static void sfn2() { }
37 } s;
38
39 template<typename C>
40 void tfn1() { }
41
42 template void tfn1<c>();
43
44 class d { };
45 template<> void tfn1<d>() { }