From: H.J. Lu Date: Wed, 4 Oct 2017 00:41:32 +0000 (-0700) Subject: test-math-iscanonical.cc: Replace bool with int X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd3a7239fddff81ac31373d69978d7aa1902c65f;p=thirdparty%2Fglibc.git test-math-iscanonical.cc: Replace bool with int 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) --- diff --git a/ChangeLog b/ChangeLog index fea4fd0cd6a..d7a185e99d0 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 aba68acb4f8..4cfb1c50553 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