Correct types of fields in libm-test.inc structures

Joseph S. Myers joseph@codesourcery.com
Tue May 14 21:01:00 GMT 2013


I noticed two of the fields in test_* structures I'd added to
libm-test.inc were of the wrong type: extra_test fields are booleans
for whether to check an extra return value from a function, and
libm-test.inc uses int for booleans, not FLOAT, and in test_f_i_data
the max_ulp field should be type int since that field should always
match the type of the return value.  I've committed as obvious this
patch to fix these types.  Tested x86_64 and x86.

2013-05-14  Joseph Myers  <joseph@codesourcery.com>

	* math/libm-test.inc (struct test_fF_f1_data): Change type of
	extra_test to int.
	(struct test_f_i_data): Change type of max_ulp to int.

diff --git a/math/libm-test.inc b/math/libm-test.inc
index 68013be..d0e3101 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -956,7 +956,7 @@ struct test_fF_f1_data
   int exceptions;
   const char *extra_name;
   FLOAT extra_init;
-  FLOAT extra_test;
+  int extra_test;
   FLOAT extra_expected;
   FLOAT extra_ulp;
 };
@@ -986,7 +986,7 @@ struct test_f_i_data
   const char *test_name;
   FLOAT arg;
   int expected;
-  FLOAT max_ulp;
+  int max_ulp;
   int exceptions;
 };
 

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Libc-alpha mailing list