Can I make gcc tell me when a calculation results in NaN or inf at runtime?

Posted by toft on Stack Overflow See other posts from Stack Overflow or by toft
Published on 2010-05-31T05:56:56Z Indexed on 2010/06/01 11:53 UTC
Read the original article Hit count: 170

Filed under:
|
|

Is there a way to tell gcc to throw a SIGFPE or something similar in response to a calculation that results in NaN or (-)inf at runtime, like it would for a divide-by-zero?

I've tried the -fsignaling-nans flag, which doesn't seem to help.

© Stack Overflow or respective owner

Related posts about c

    Related posts about gcc