Allan Sandfeld Jensen wrote: > Basically any compiler that cares about benchmarks have it enabled by default. > > Many of them however have multiple levels of relaxed floating point. The > lowest levels will try to be as accurate as possible, while the higher will > loosen the accuracy and just try to be as fast as possible.
Perhaps we need something along these lines: When -ansi or -pedantic is used, the compiler should disallow anything "unsafe" that may break compliance, warning if someone uses a paradox like "-ansi -funsafe-math-optimizations". As has been pointed out elsewhere in this thread, -funsafe-math-optimizations implies too many different things, and is vaguely documented. I'd like to see varying levels of floating-point optimization, including an option that uses an internal library optimized for both speed and correctness, which are not mutually exclusive. ..Scott