--- gcc/gcc/testsuite/c-c++-common/tsan/pr81275.c +++ gcc/gcc/testsuite/c-c++-common/tsan/pr81275.c @@ -1,6 +1,6 @@ /* PR sanitizer/81275 */ /* { dg-do compile } */ -/* { dg-options "-Wreturn-type -fsanitize=thread" } */ +/* { dg-options "-Wno-error=return-type -Wreturn-type -fsanitize=thread" } */ int f1 (int a, int b) --- gcc/gcc/testsuite/g++.dg/Wattributes-2.C +++ gcc/gcc/testsuite/g++.dg/Wattributes-2.C @@ -1,7 +1,7 @@ // Test to verify that attributes on distinct overloads of a function // with the same name are properly looked up and applied. // { dg-do compile } -// { dg-options "-Wall" } +// { dg-options "-Wno-error=return-type -Wall" } int foo (int); --- gcc/gcc/testsuite/g++.dg/cpp0x/variadic122.C +++ gcc/gcc/testsuite/g++.dg/cpp0x/variadic122.C @@ -1,6 +1,6 @@ // PR c++/52043 // { dg-do compile { target c++11 } } -// { dg-options "-Wreturn-type" } +// { dg-options "-Wno-error=return-type -Wreturn-type" } template < class T > struct Container { --- gcc/gcc/testsuite/g++.dg/ext/attr-noreturn-3.C +++ gcc/gcc/testsuite/g++.dg/ext/attr-noreturn-3.C @@ -1,7 +1,7 @@ /* PR c++/84294 - attributes on a function template redeclaration silently discarded { dg-do compile } - { dg-options "-O -fdump-tree-optimized" } */ + { dg-options "-Wno-error=return-type -O -fdump-tree-optimized" } */ typedef void Func (); --- gcc/gcc/testsuite/g++.dg/ext/attr-noreturn.C +++ gcc/gcc/testsuite/g++.dg/ext/attr-noreturn.C @@ -4,7 +4,7 @@ // "inherit" attribute noreturn from a primary template declared with // one. // { dg-do compile } -// { dg-options "-O -Wall -fdump-tree-optimized" } +// { dg-options "-Wno-error=return-type -O -Wall -fdump-tree-optimized" } struct Noreturn { }; struct Returns { }; --- gcc/gcc/testsuite/g++.dg/missing-return.C +++ gcc/gcc/testsuite/g++.dg/missing-return.C @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-Wreturn-type -fdump-tree-optimized -O" } */ +/* { dg-options "-Wno-error=return-type -Wreturn-type -fdump-tree-optimized -O" } */ int foo(int a) { --- gcc/gcc/testsuite/g++.dg/pr85523.C +++ gcc/gcc/testsuite/g++.dg/pr85523.C @@ -1,4 +1,4 @@ -/* { dg-options "-fdiagnostics-show-caret" } */ +/* { dg-options "-Wno-error=return-type -fdiagnostics-show-caret" } */ /* Verify that we emit a "return *this;" fix-it hint for a missing return in an assignment operator. */ --- gcc/gcc/testsuite/g++.dg/tm/pr60004.C +++ gcc/gcc/testsuite/g++.dg/tm/pr60004.C @@ -1,5 +1,5 @@ // { dg-do compile } -// { dg-options "-fgnu-tm" } +// { dg-options "-Wno-error=return-type -fgnu-tm" } int a; int f() { --- gcc/gcc/testsuite/g++.dg/torture/pr43257.C +++ gcc/gcc/testsuite/g++.dg/torture/pr43257.C @@ -1,4 +1,5 @@ /* { dg-do assemble } */ +/* { dg-options "-Wno-error=return-type" } */ class A {}; class B {}; --- gcc/gcc/testsuite/g++.dg/torture/pr54684.C +++ gcc/gcc/testsuite/g++.dg/torture/pr54684.C @@ -1,5 +1,5 @@ // { dg-do compile } -// { dg-options "-fno-short-enums" } +// { dg-options "-Wno-error=return-type -fno-short-enums" } typedef union tree_node *tree; typedef union gimple_statement_d *gimple; --- gcc/gcc/testsuite/g++.dg/torture/pr55740.C +++ gcc/gcc/testsuite/g++.dg/torture/pr55740.C @@ -1,4 +1,5 @@ // { dg-do compile } +// { dg-options "-Wno-error=return-type" } static bool st_IsPathDelimiter( char c ) { return c == '/'; } bool IsValidPath( char const * filename ) --- gcc/gcc/testsuite/g++.dg/torture/pr56694.C +++ gcc/gcc/testsuite/g++.dg/torture/pr56694.C @@ -1,5 +1,5 @@ // { dg-do compile } -// { dg-options "-fopenmp" } +// { dg-options "-Wno-error=return-type -fopenmp" } // { dg-require-effective-target fopenmp } class GException { --- gcc/gcc/testsuite/g++.dg/torture/pr60648.C +++ gcc/gcc/testsuite/g++.dg/torture/pr60648.C @@ -1,5 +1,6 @@ // PR target/60648 // { dg-do compile } +// { dg-options "-Wno-error=return-type" } // { dg-additional-options "-fPIC" { target fpic } } enum component --- gcc/gcc/testsuite/g++.dg/torture/pr64280.C +++ gcc/gcc/testsuite/g++.dg/torture/pr64280.C @@ -1,4 +1,5 @@ // { dg-do compile } +// { dg-options "-Wno-error=return-type" } class A { --- gcc/gcc/testsuite/g++.dg/torture/pr68470.C +++ gcc/gcc/testsuite/g++.dg/torture/pr68470.C @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-options "-Wno-error=return-type" } */ void deallocate(void *); void *a; --- gcc/gcc/testsuite/g++.dg/torture/pr71281.C +++ gcc/gcc/testsuite/g++.dg/torture/pr71281.C @@ -1,5 +1,6 @@ // PR middle-end/71281 // { dg-do compile } +// { dg-options "-Wno-error=return-type" } // { dg-additional-options "-std=c++11 -Ofast" } --- gcc/gcc/testsuite/g++.dg/tree-ssa/pr87686.C +++ gcc/gcc/testsuite/g++.dg/tree-ssa/pr87686.C @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2" } */ +/* { dg-options "-Wno-error=return-type -O2" } */ class a { public: --- gcc/gcc/testsuite/g++.dg/ubsan/pr81212.C +++ gcc/gcc/testsuite/g++.dg/ubsan/pr81212.C @@ -1,6 +1,6 @@ // PR c++/81212 // { dg-do compile } -// { dg-options "-Wreturn-type -fsanitize=return" } +// { dg-options "-Wno-error=return-type -Wreturn-type -fsanitize=return" } struct S { --- gcc/gcc/testsuite/g++.dg/warn/Wreturn-type-11.C +++ gcc/gcc/testsuite/g++.dg/warn/Wreturn-type-11.C @@ -1,6 +1,6 @@ // PR c++/88554 // { dg-do compile } -// { dg-options "-Wreturn-type" } +// { dg-options "-Wno-error=return-type -Wreturn-type" } struct X { friend X & operator+= (X &, int) { } // { dg-warning "no return statement in function returning non-void" } --- gcc/gcc/testsuite/g++.dg/warn/Wreturn-type-6.C +++ gcc/gcc/testsuite/g++.dg/warn/Wreturn-type-6.C @@ -1,6 +1,6 @@ /* PR c++/40749 */ /* { dg-do compile } */ -/* { dg-options "-Wreturn-type" } */ +/* { dg-options "-Wno-error=return-type -Wreturn-type" } */ struct A {}; const A a() {} /* { dg-warning "no return statement" } */ --- gcc/gcc/testsuite/g++.dg/warn/Wreturn-type-9.C +++ gcc/gcc/testsuite/g++.dg/warn/Wreturn-type-9.C @@ -1,5 +1,5 @@ // related to PR c++/55189 -// { dg-options "-Wreturn-type" } +// { dg-options "-Wno-error=return-type -Wreturn-type" } int f1() { --- gcc/gcc/testsuite/g++.dg/warn/noreturn-2.C +++ gcc/gcc/testsuite/g++.dg/warn/noreturn-2.C @@ -1,4 +1,4 @@ -// { dg-options "-Wall" } +// { dg-options "-Wno-error=return-type -Wall" } template int f (T t) { } // { dg-warning "no return" } --- gcc/gcc/testsuite/g++.dg/warn/noreturn-6.C +++ gcc/gcc/testsuite/g++.dg/warn/noreturn-6.C @@ -1,6 +1,6 @@ // PR c++/30988 // { dg-do compile } -// { dg-options "-O2 -Wall" } +// { dg-options "-Wno-error=return-type -O2 -Wall" } void f (const char *); --- gcc/gcc/testsuite/g++.dg/warn/noreturn-7.C +++ gcc/gcc/testsuite/g++.dg/warn/noreturn-7.C @@ -1,6 +1,6 @@ // PR c++/30988 // { dg-do compile } -// { dg-options "-O2 -Wall" } +// { dg-options "-Wno-error=return-type -O2 -Wall" } void f (const char *) __attribute__ ((noreturn)); void f (int); --- gcc/gcc/testsuite/g++.dg/warn/pr81275-2.C +++ gcc/gcc/testsuite/g++.dg/warn/pr81275-2.C @@ -1,6 +1,6 @@ // PR sanitizer/81875 // { dg-do compile } -// { dg-options "-Wreturn-type" } +// { dg-options "-Wno-error=return-type -Wreturn-type" } struct C { C (); ~C (); }; --- gcc/gcc/testsuite/g++.dg/warn/pr81275-3.C +++ gcc/gcc/testsuite/g++.dg/warn/pr81275-3.C @@ -1,6 +1,6 @@ // PR sanitizer/81875 // { dg-do compile } -// { dg-options "-Wreturn-type" } +// { dg-options "-Wno-error=return-type -Wreturn-type" } struct C { C (); ~C (); }; --- gcc/gcc/testsuite/g++.dg/warn/pr83045.C +++ gcc/gcc/testsuite/g++.dg/warn/pr83045.C @@ -1,6 +1,6 @@ // PR c++/83045 // { dg-do compile } -// { dg-options "-Wreturn-type -O2" } +// { dg-options "-Wno-error=return-type -Wreturn-type -O2" } void foo (void); --- gcc/gcc/testsuite/g++.dg/wrappers/cp-stdlib.C +++ gcc/gcc/testsuite/g++.dg/wrappers/cp-stdlib.C @@ -3,6 +3,7 @@ errors in this file. */ // { dg-excess-errors "expected to be full of errors, but not an ICE" } +// { dg-options "-Wno-error=return-type" } namespace std { --- gcc/gcc/testsuite/g++.old-deja/g++.brendan/crash13.C +++ gcc/gcc/testsuite/g++.old-deja/g++.brendan/crash13.C @@ -1,5 +1,5 @@ // { dg-do assemble } -// { dg-options "-Wreturn-type" } +// { dg-options "-Wno-error=return-type -Wreturn-type" } // GROUPS passed old-abort class gen_op { --- gcc/gcc/testsuite/g++.old-deja/g++.brendan/crash52.C +++ gcc/gcc/testsuite/g++.old-deja/g++.brendan/crash52.C @@ -1,5 +1,5 @@ // { dg-do assemble } -// { dg-options "-Wreturn-type" } +// { dg-options "-Wno-error=return-type -Wreturn-type" } // GROUPS passed old-abort #include --- gcc/gcc/testsuite/g++.old-deja/g++.bugs/900205_03.C +++ gcc/gcc/testsuite/g++.old-deja/g++.bugs/900205_03.C @@ -1,5 +1,5 @@ // { dg-do assemble } -// { dg-options "-Wreturn-type -pedantic-errors" } +// { dg-options "-Wno-error=return-type -Wreturn-type -pedantic-errors" } // g++ 1.36.1 bug 900205_03 // Section 6.6.3 of the cfront 2.0 Reference Manual says "A return statement --- gcc/gcc/testsuite/g++.old-deja/g++.jason/report.C +++ gcc/gcc/testsuite/g++.old-deja/g++.jason/report.C @@ -1,5 +1,5 @@ // { dg-do assemble } -// { dg-options "-Wreturn-type" } +// { dg-options "-Wno-error=return-type -Wreturn-type" } // GROUPS passed error-reporting // DR 295 allows qualification via typedef --- gcc/gcc/testsuite/g++.old-deja/g++.law/friend5.C +++ gcc/gcc/testsuite/g++.old-deja/g++.law/friend5.C @@ -1,5 +1,5 @@ // { dg-do assemble } -// { dg-options "-Wreturn-type" } +// { dg-options "-Wno-error=return-type -Wreturn-type" } // GROUPS passed friends extern "C" int good_friend(int); --- gcc/gcc/testsuite/g++.old-deja/g++.law/operators17.C +++ gcc/gcc/testsuite/g++.old-deja/g++.law/operators17.C @@ -1,5 +1,5 @@ // { dg-do assemble } -// { dg-options "-Wall -pedantic-errors" } +// { dg-options "-Wno-error=return-type -Wall -pedantic-errors" } // GROUPS passed operators // copy file // From: gfm@mencon.mencon.oz.au (Graham Menhennitt) --- gcc/gcc/testsuite/g++.old-deja/g++.mike/p646.C +++ gcc/gcc/testsuite/g++.old-deja/g++.mike/p646.C @@ -1,5 +1,5 @@ // { dg-do assemble } -// { dg-options "-Wno-deprecated -Wreturn-type" } +// { dg-options "-Wno-error=return-type -Wno-deprecated -Wreturn-type" } // GROUPS passed i960 /* Bug Id: bnr --- gcc/gcc/testsuite/g++.old-deja/g++.robertl/eb92.C +++ gcc/gcc/testsuite/g++.old-deja/g++.robertl/eb92.C @@ -1,2 +1,3 @@ // { dg-do assemble } +// { dg-options "-Wno-error=return-type" } template f<0>(){} // { dg-message "" } invalid code