2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / gcc.dg / qual-return-2.c
blob272787ee7c27a9807def63795f4e96205171db68
1 /* Test for warnings for qualified function return types. -pedantic test. */
2 /* Origin: Joseph Myers <jsm28@cam.ac.uk> */
3 /* { dg-do compile } */
4 /* { dg-options "-pedantic" } */
6 /* Qualifying a function return type makes no sense. */
8 /* "volatile void" is a GNU extension, so only warn at -pedantic.
9 Strictly, the first two of these should warn only if the function is
10 somewhere used or defined. */
12 volatile void vvoid_fn (void); /* { dg-warning "qualified" "volatile decl" } */
13 volatile void (*vvoid_ptr) (void); /* { dg-warning "qualified" "volatile ptr" } */
14 volatile void vvoid_fn2 (void) { } /* { dg-warning "qualified" "volatile defn" } */