2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / gcc.dg / Wold-style-definition-1.c
blobd4fb8bd8da164f899e9ad73c25e225007da2676c
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" } */
7 void
8 bar (a) int a; { } /* { dg-warning "old-style parameter declaration" } */
10 void bar1 () {} /* { dg-warning "old-style parameter declaration" } */
12 extern void bar2 (void);
14 void bar2 () {} /* { dg-warning "old-style parameter declaration" } */
16 extern void bar3 (int);
18 void bar3 (a) {} /* { dg-warning "old-style parameter declaration" } */
20 void bar4 (a) {} /* { dg-warning "old-style parameter declaration" } */
22 void bar5 (int a) {}
24 void bar6 (void) {}