5 ms·
> such as not evaluating either the true or false part of an if-statement Do you mean `if-else if` or `if-else`? Because the second would work and would always
by heavenlyblue 5y ago
> such as not evaluating either the true or false part of an if-statement
Do you mean `if-else if` or `if-else`? Because the second would work and would always short-circuit to else.
- nwallin 5y agoNo. Imagine you have this: if (x < 7) doSomething(); else doSomethingElse(); With -ffast-math, the compiler is allowed to call neither doSomething() nor doSomethingElse() if x is nan. Which IMHO is not great.
- Linosaurus 5y agoI imagine it means that the compiler could turn an if(x<6)-else into two free standing if statement like if(x<6), if(x>=6). Which will logically work under these assumptions.