The k = (int)ds; cast inside gdtoa/dtoa can set FE_INEXACT.
Having printf() change the FE_INEXACT flag results in some of the
msun tests failing when compiling them with debugging flags.
To avoid this, save the state of FE_INEXACT before calling gdtoa()
and clear it if gdtoa() set it.
Details
Details
- Reviewers
dim
building msun with -DDOPRINT -DDEBUG -DDOPRINT_LD80 no longer causes all tests to fail
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 37473 Build 34362: arc lint + arc unit
Event Timeline
Comment Actions
Hm, wouldn't it be better to fix this in gdtoa() instead? Then it would be solved for all gdtoa() consumers. That said, I've understood that the gdtoa code is very impenetrable...
Comment Actions
I had a brief look at modifying the gdtoa code, but it seemed to be quite akward so I chose to change the wrapper instead.
Comment Actions
Well, if printf is the only consumer of gdtoa, then this is OK with me. Otherwise I'd just hide the "real" gdtoa behind the wrapper for everybody.