| 1 |
/* Test for warnings for qualified function return types. Bug 15052 |
| 2 |
from Olatunji Ruwase (tjruwase at stanfordalumni.org): qualifiers |
| 3 |
should not be lost when merging declarations. */ |
| 4 |
|
| 5 |
/* Origin: Joseph Myers <[email protected]> */ |
| 6 |
/* { dg-do compile } */ |
| 7 |
/* { dg-options "-std=gnu99" } */ |
| 8 |
|
| 9 |
int foo (); /* { dg-message "note: previous declaration" "different qualifiers" } */ |
| 10 |
const int foo () { return 0; } /* { dg-error "conflicting types" "different qualifiers" } */ |
| 11 |
|
| 12 |
void bar (void); |
| 13 |
volatile void bar () { } /* { dg-warning "qualified|volatile" "different qualifiers" } */ |
| 14 |
|
| 15 |
volatile void baz (void); |
| 16 |
void baz () { } /* { dg-warning "not compatible" "different qualifiers" } */ |