From dd3a7239fddff81ac31373d69978d7aa1902c65f Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 3 Oct 2017 17:41:32 -0700 Subject: [PATCH 46] test-math-iscanonical.cc: Replace bool with int MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix GCC 7 compilation error: test-math-iscanonical.cc: In function ‘void check_type()’: test-math-iscanonical.cc:33:11: error: use of an operand of type ‘bool’ in ‘operator++’ is deprecated [-Werror=deprecated] errors++; ^~ Since not all non-zero error counts are errors, return errors != 0 instead. * math/test-math-iscanonical.cc (error): Replace bool with int. (do_test): Return errors != 0. (cherry picked from commit cdd4155d6c527c00a89606385859984e35bd2910 and commit 758f1bfa2a1bccb52f1b3e97444a367d35aceaee) --- ChangeLog | 5 +++++ math/test-math-iscanonical.cc | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index fea4fd0cd6..d7a185e99d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2017-10-04 H.J. Lu + + * math/test-math-iscanonical.cc (error): Replace bool with int. + (do_test): Return errors != 0. + 2017-10-03 Gabriel F. T. Gomes [BZ #22235] diff --git a/math/test-math-iscanonical.cc b/math/test-math-iscanonical.cc index aba68acb4f..4cfb1c5055 100644 --- a/math/test-math-iscanonical.cc +++ b/math/test-math-iscanonical.cc @@ -20,7 +20,7 @@ #include #include -static bool errors; +static int errors; template static void @@ -42,7 +42,7 @@ do_test (void) #if __HAVE_DISTINCT_FLOAT128 check_type<_Float128> (); #endif - return errors; + return errors != 0; } #include