[patch, fortran] Reduce Explosion of noise from -Wall
Dominique Dhumieres
dominiq@lps.ens.fr
Thu Aug 23 11:00:00 GMT 2012
> 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
More information about the Fortran
mailing list