From: SF/projects/mingw n. l. <min...@li...> - 2012-03-07 18:10:22
|
Bugs item #2997007, was opened at 2010-05-05 02:07 Message generated for change (Comment added) made by gustavh You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=2997007&group_id=2435 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: mingw runtime Group: None >Status: Open Resolution: Fixed Priority: 5 Private: No Submitted By: Gustav Hållberg (gustavh) Assigned to: Keith Marshall (keithmarshall) Summary: ANSI mode printf("%a", ...) is incorrect Initial Comment: printf("%a", ...) produces incorrect output for some numbers. In particular, it seems to be broken for numbers smaller than the smallest normalized single-precision floating-point number. I originally saw this using MinGW runtime 3.15.2 and 3.18.0 has the same problem. Build the test case using gcc -Wall -std=c99 printf-a-bug.c. When run, it will print: 0x1p-125 2.35099e-038 0x0p-126 1.17549e-038 where the second line _should_ read 0x1p-126 (or equivalent). ---------------------------------------------------------------------- >Comment By: Gustav Hållberg (gustavh) Date: 2012-03-07 10:10 Message: Sounds good :) ---------------------------------------------------------------------- Comment By: Keith Marshall (keithmarshall) Date: 2012-03-07 06:26 Message: Is this still an issue? I believe it has been fixed; with my current libmingwex.a build I see: $ mingw32-gcc -std=c99 ~/downloads/printf-a-bug.c $ ./a.exe 0x8p-128 2.35099e-038 0x8p-129 1.17549e-038 Okay to close? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=2997007&group_id=2435 |