[RFC] Fix PR28684

Michael Matz matz@suse.de
Tue Nov 14 21:03:00 GMT 2006


Hi,

On Tue, 14 Nov 2006, Roger Sayle wrote:

> I'm trying to constructively work towards some kind of resolution. To me 
> the fundamental issue is why not use "-ffast-math"?
> 
> Some of the arguments have focused on "because I don't understand which 
> transformations that enables".  The ignorance of users is not normally a 
> great motivation for change.

Well, actually it is.  Because if users are confused chance is that also 
gcc developers are confused.  See e.g. all the transformations in the past 
which were put under {unsafe,fast}_math_* while they weren't necessary 
there.

For developers it's much easier to have very fine-graned control over 
exactly what transformations can be enabled or not, it's not a matter of 
confusion but control.

So internally we actually don't want to have a unsafe_math flag at all, 
but instead a collection of flags precisely mapping to a defined set of 
transformations done under them.  Any user option then maps to a subset of 
those and could also be clearly documented.  I.e. exactly like fast_math 
was split into different flags.

So, I guess my claim is, that also splitting unsafe_math into a set of 
flags reflecting each individual type of transformation would be 
worthwhile from user perspective _and_ gcc developer perspective.  Yes, as 
you say, all of those have the common property that they will lead to 
non-bit-identical results, but that doesn't mean immediately that they 
have to be controled by the same flag.

So far about my meta opinion ;-)


Ciao,
Michael.



More information about the Gcc-patches mailing list