[Bug target/51007] Quadmath I/O doesn't work on MinGW

fxcoudert at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Nov 7 11:03:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51007

--- Comment #1 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> 2011-11-07 11:03:32 UTC ---
I don't know if it's related, or two different bugs, but hexadecimal printing
has the correct mantissa with a wrong exponent. See below the same testcase
compile on my mac (native compiler) and cross-compiled to mingw:

$ cat v.c 
#include <quadmath.h>
#include <stdio.h>

int main (void)
{
  char buf[100];
  quadmath_snprintf (buf, sizeof buf, "%.60Qa", (__float128) 3.14);
  puts (buf);
}
$ gcc-4.6 v.c -lquadmath && ./a.out 
0x1.91eb851eb851f00000000000000000000000000000000000000000000000p+1
$ ./cross/bin/i586-pc-mingw32-gcc v.c -static -lquadmath
$ /opt/wine/bin/wine ./a.exe 
0x1.91eb851eb851f00000000000000000000000000000000000000000000000p-5318



More information about the Gcc-bugs mailing list