PR middle-end/85602 - -Wsizeof-pointer-memaccess for strncat with size of source
[official-gcc.git] / gcc / testsuite / gcc.dg / qual-return-3.c
blobbd760799d98e26b7c6bb6eda57d5b9d85652493c
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. */
5 /* Origin: Joseph Myers <jsm@polyomino.org.uk> */
6 /* { dg-do compile } */
7 /* { dg-options "-std=gnu99" } */
9 int foo (); /* { dg-message "note: previous declaration" "different qualifiers" } */
10 const int foo () { return 0; } /* { dg-error "conflicting types" "different qualifiers" } */
12 void bar (void);
13 volatile void bar () { } /* { dg-warning "qualified|volatile" "different qualifiers" } */
15 volatile void baz (void);
16 void baz () { } /* { dg-warning "not compatible" "different qualifiers" } */