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

--- Comment #11 from Ethan Tira-Thompson <ejtttje at gmail dot com> 2011-10-14 
22:07:44 UTC ---
Marc: is this code perusable? I'm curious because I expect either the
calculations may generate NaN or not at all.  If they might and you even have
test cases to handle it, then I'm surprised you would ever want to support
running with -ff-m-o.  Conversely if you knew the code doesn't generate the
nonfinite values, then you don't need the classifications in the first
place...?

I'm guessing (and apologies if this is inaccurate) that this might boil down to
saying that you want to interpret an end user setting -ff-m-o as an opportunity
to skip validating their input or skip doing assertions during its processing,
which could be a reasonable thing to do, but that's a choice I'd rather leave
to individual developers, e.g. can also wrap code with #if
__FINITE_MATH_ONLY__==0 or such...

Or in other words, it's only a missed optimization if you wind up with
classification calls, whereas it's a full-fledged execution error when NaN gets
past validation.

Reply via email to