OSDN Git Service

Index: gcc/ChangeLog
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / qual-return-3.c
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 <jsm@polyomino.org.uk> */
6 /* { dg-do compile } */
7 /* { dg-options "" } */
8
9 int foo (); /* { dg-error "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" } */