URL
https://opencores.org/ocsvn/scarts/scarts/trunk
Subversion Repositories scarts
[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [gcc.dg/] [qual-return-3.c] - Rev 12
Compare with Previous | Blame | View Log
/* Test for warnings for qualified function return types. Bug 15052 from Olatunji Ruwase (tjruwase at stanfordalumni.org): qualifiers should not be lost when merging declarations. */ /* Origin: Joseph Myers <jsm@polyomino.org.uk> */ /* { dg-do compile } */ /* { dg-options "" } */ int foo (); /* { dg-error "previous declaration" "different qualifiers" } */ const int foo () { return 0; } /* { dg-error "conflicting types" "different qualifiers" } */ void bar (void); volatile void bar () { } /* { dg-warning "qualified|volatile" "different qualifiers" } */ volatile void baz (void); void baz () { } /* { dg-warning "not compatible" "different qualifiers" } */