Debian Codegraph @

gcc/testsuite/gcc.dg/Wdeprecated-non-prototype-1.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-std=gnu17 -Wdeprecated-non-prototype" } */
3
4 void f1 ();
5 void f2 (); /* { dg-note "declared here" } */
6 void f3 (...);
7
8 void
9 g ()
10 {
11 f1 ();
12 f2 (1); /* { dg-warning "does not allow arguments for function" } */
13 f3 (1);
14 }
15
16 void
17 f1 ()
18 {
19 }
20
21 void
22 f2 (int i) /* { dg-warning "does not allow defining parameters for function" } */
23 {
24 }