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

--- Comment #5 from Marc Glisse <marc.glisse at normalesup dot org> 2011-03-01 
22:15:48 UTC ---
Created attachment 23509
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23509
Overkill

I was having a hard time making it nice and clean, so I went for totally
overkill. It might be a bit scary to have 200 lines of code just to implement
an addition. And questionable whether avoiding a few overflows is worth the
complication. On the plus side, it makes it possible to give a simpler
implementation of ratio_less. And __safe_add can be removed (24 lines).

I'll try again to come up with a simpler solution.

Reply via email to