[Bug libstdc++/47913] [C++0x] improve ratio_add to overflow less often
marc.glisse at normalesup dot org
gcc-bugzilla@gcc.gnu.org
Wed May 4 16:35:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47913
--- Comment #21 from Marc Glisse <marc.glisse at normalesup dot org> 2011-05-04 16:27:28 UTC ---
Created attachment 24182
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24182
first iteration in patch format
Inserted in <ratio>, with some cleanup of dead code, rewrite of ratio_less. The
static_assertions should help notice problems (in particular the __big_div ones
should be good). I haven't tested much, but it seems to pass the current
testsuite. Additional tests (no time to format or check them now) are
available:
* at the end of the "overkill" attachment
* in comment #13 and comment #17
More information about the Gcc-bugs
mailing list