regression in list directed write
Tim Prince
tprince@computer.org
Mon Jan 10 16:43:00 GMT 2005
At 08:15 AM 1/10/2005, Paul Thomas wrote:
>>This works for me on i386-*-freebsd. That error message
>>originates in only 1 place in io/write.c in output_float.
>
>Indeed, I just did a grep on the error message "printf is broken" to find
>that.
>
>>To call output_float, you need to get pass an if()
>>statement that uses isfinite() and isnan(). Are these
>>functions working correctly on your target.
>
>I had tested that printf and sprintf are correctly yielding NaN and Infinity.
>
>However, isfinite and isnan are indeed broken in gcc-4.0 for both float
>and double. isnan works for float in the Cygwin supplied gcc-3.3 but the
>other combos are broken.
>
>#include <stdio.h>
>#include <math.h>
>int main( void)
> {
> float x =0.0, y=0.0;
> char outc[30];
> sprintf(outc , "x/y = %+-#31.*e" , 10 , x/y );
> printf("%s\n" , outc );
> printf("isfinite=%d isnan=%d \n" , isfinite( x/y ) , isnan( x/y) );
> return 0;
> }
So, is the only acceptable solution to have them supported by newlib?
Tim Prince
More information about the Fortran
mailing list