PR tree-optimization/84740
[official-gcc.git] / gcc / testsuite / gcc.dg / Wold-style-definition-1.c
blob01d3ffbea7575192093d2195c22d9704f107b385
1 /* Test for warning about old-style function definition. */
3 /* Origin: Andreas Jaeger <aj@suse.de> */
4 /* { dg-do compile } */
5 /* { dg-options "-Wold-style-definition -std=gnu89" } */
7 void
8 bar (a) int a; { } /* { dg-warning "old-style function definition" } */
10 void bar1 () {} /* { dg-warning "old-style function definition" } */
12 extern void bar2 (void);
14 void bar2 () {} /* { dg-warning "old-style function definition" } */
16 extern void bar3 (int);
18 void bar3 (a) {} /* { dg-warning "old-style function definition" } */
20 void bar4 (a) {} /* { dg-warning "old-style function definition" } */
22 void bar5 (int a) {}
24 void bar6 (void) {}