------- Comment #13 from jb at gcc dot gnu dot org 2006-03-16 08:30 ------- (In reply to comment #12) > The attached C program fails on IA64 because the printf rounds the last digit > of MIN_LDBL down when it prints it and so it can't be read back in. The basic > problem is that LDBL_MAX and LDBL_MIN (or for that matter DBL_MIN and DBL_MAX) > cannot be represented exactly in decimal form so printf has to do some > rounding > that may make the process non-reversable when trying to go back via strtod or > strtold.
Ah, I see. Well, IMHO formatted IO of FOO_MAX/MIN is a rather obscure corner case, so I think a good enough solution would be to change the testcase to instead test with FOO_MAX/2 and FOO_MIN*2 (just to check that we have large enough field widths etc. and not worry about rounding out of range). But I'll ask the standards gurus on c.l.f first to make sure. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24685