This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCC beaten by ICC in stupid trig test!


Joe Buck wrote:

I'm aware of the usual examples. Do you think that we need yet another fast-math flag to allow the compiler to reassociate values in floating-point arithmetic? -freally-unsafe-math-optimizations perhaps? Or maybe such a programmer as you describe will just turn off -funsafe-math-optimizations.


No.  Why would we need such a thing?  If the user does not care about
order of evaluation, the user can write a+b+c .

That's an appropriate statement for Fortran, but not for other languages like C, C++ and Ada, where a+b+c is semantically equivalent to (a+b)+c and the reassociation is not allowed in either case.

I dislike anything being called an optimization, unsafe or not, when it
is not an optimization but in fact a distortion of required language
semantics.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]