This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: [PATCHv2 11/14] Apply LIT(x) to floating point literals in libm-test.c


On Fri, 20 May 2016, Paul E. Murphy wrote:

>      if ($descr[$i] =~ /f|i|l|L/) {
> -      $cline .= ", $args[$current_arg]";
> +      if ($descr[$i] eq "f" and not ($args[0] eq "nexttoward" and $current_arg == 2)) {

Rather than specially checking for the name "nexttoward" here, I think it 
would be cleaner to use something other than "f" as the argument 
descriptor for the case where the argument is always long double, and 
rename struct test_ff_f_data_nexttoward accordingly.  (Strictly you don't 
need to create another macro like RUN_TEST_LOOP_ff_f with the 
corresponding name and use it for the nexttoward tests, but it's probably 
cleaner to do so as well.)

(Nothing should actually be using the first argument to TEST_* any more; 
it's a relic from when TEST_* generated code rather than data, which 
hasn't been cleaned up yet.)

-- 
Joseph S. Myers
joseph@codesourcery.com


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