This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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: [patch, fortran] Reduce Explosion of noise from -Wall


> Here is a patch to not warn for comparisons against zero.

Does it make sense to warn for a==b, but not for a-b==0.0?

I think the real question (see
https://groups.google.com/forum/?fromgroups=#!topic/comp.lang.fortran/QZC7TNq9aBw )
is: does the code has special floating-point values, as in
if(x==0.1) y=1.0/(x-0.1)
or not? and the compiler has no way to know the answer.

Note that there has been a long "bike-shedding" about what should be in -Wall
in the gcc list. AFAICT the only conclusion I infered is that -Wall has been
badly designed (all in -Wall does not mean all), but it is too late to
change it.

Now as a user I can remember -Wextra as well as -Wall and I think
the warnings about conversions and floating-point comparisons
should go in -Wextra.

Cheers,

Dominique


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