This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [patch, fortran] Reduce Explosion of noise from -Wall
- From: dominiq at lps dot ens dot fr (Dominique Dhumieres)
- To: fortran at gcc dot gnu dot org
- Cc: tkoenig at netcologne dot de
- Date: Thu, 23 Aug 2012 13:00:10 +0200
- Subject: 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