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]

Re: Fourth Draft "Unsafe fp optimizations" project description.


> > <<test.c:4: warning: comparing floating point with == or != is unsafe
> > >>
> > 
> > This is an annoying warning, because it is nonsense.
> 
> For what it's worth, I agree with you.  But some people's nonsense is
> other people's sense, and it isn't invoked by any other "group"
> warning flag, like -W or -Wall, so if people want it, they can have it.
> I don't want it, and I don't specify -Wfloat-equal, and I don't get it.

Provided that the warning is never added to -Wall, and provided that the
text is changed (for example, to "may be unsafe", which is more accurate),
it's OK with me.  It may be useful to request the compiler to flag these
operations.

But a warning should never be added to -Wall if it will direct the
maintainer of a program to make it less efficient (or else live with
the warning).


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