I want my FPE!

Dave Korn dave.korn.cygwin@googlemail.com
Wed Dec 9 14:23:00 GMT 2009


Mark Geisert wrote:
> Mark Geisert writes:
>> I've tried many things [...]
> 
> ...but I neglected the possibility of compiler expression optimization.  I
> replaced "1E200L * 1E200L" with "d * d" where d is initialized with 1E200L. 
> Voila, SIGFPE results and is trapped the way I wanted to.

  Ah, the old "Where did my delay loop go?" problem :-)

> I'm still looking for a way to similarly handle integer overflow exceptions.

  Try -ftrapv.  This is supposed to do what you want, but I'm not sure how
much care and attention it gets, so you may discover bugginess.

    cheers,
      DaveK


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list