This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix test-suite fallout of default -Wreturn-type.


On 10/18/2017 08:48 AM, Martin Liška wrote:
This is second patch that addresses test-suite fallout. All these tests fail because -Wreturn-type is
now on by default.

+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-diag3.C
-constexpr T g(T t) { return f(t); } // { dg-error "f.int" }
+constexpr T g(T t) { return f(t); } // { dg-error "f.int" "" { target c++14_only } }

+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-neg3.C
-  constexpr int bar() { return a.foo(); } // { dg-error "foo" }
+  constexpr int bar() { return a.foo(); } // { dg-error "foo" "" { target c++14_only } }

Why are these changes needed? They aren't "Return a value for functions with non-void return type, or change type to void, or add -Wno-return-type for test."

The rest of the patch is OK.

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]