Debian Codegraph @

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

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