OSDN Git Service

* gcc.dg/cpp/ucs.c: Improved long UCS test.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / qual-return-2.c
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" } */
5
6 /* Qualifying a function return type makes no sense.  */
7
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.  */
11
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" } */