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)
+2017-10-04 H.J. Lu <hongjiu.lu@intel.com>
+
+ * math/test-math-iscanonical.cc (error): Replace bool with int.
+ (do_test): Return errors != 0.
+
2017-10-03 Gabriel F. T. Gomes <gabriel@inconstante.eti.br>
[BZ #22235]
#include <math.h>
#include <stdio.h>
-static bool errors;
+static int errors;
template <class T>
static void
#if __HAVE_DISTINCT_FLOAT128
check_type<_Float128> ();
#endif
- return errors;
+ return errors != 0;
}
#include <support/test-driver.c>