This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [fortran, patch] reduce noise of -Wconversion
- From: Tobias Burnus <burnus at net-b dot de>
- To: Daniel Franke <franke dot daniel at gmail dot com>
- Cc: fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Sat, 08 May 2010 20:17:25 +0200
- Subject: Re: [fortran, patch] reduce noise of -Wconversion
- References: <201005081915.53758.franke.daniel@gmail.com>
Daniel Franke wrote:
> attached patch attempts to reduce amount of noise generated by -Wconversion.
>
The changes make sense to me, however, I am wondering whether we need
some -Wconversion-extra option. The current -Wconversion option is very
verbose, but it allowed me to find bugs such as:
double_var = sqrt(2.0)
where the RHS should be: "sqrt(2.0d0)". The current warning allows one
to find it (buried in tons of other messages) - but with the proposed
patch, this information is no longer available. I would like to get some
warning for (REAL/COMPLEX less precision) -> (REAL/COMPLEX higher
precision) back. I personally do not mind to have an extra option for
this. Thus, -Wall -Wextra finds both problems, but one can then be disabled.
I think regarding disabling, I like the new middle-end feature, which
prints the warning flag in squared brackets after the warning message
-fdiagnostics-show-option (enabled by default), e.g.
foo.c:4:2: warning: 'j' is used uninitialized in this function
[-Wuninitialized]
and with -Werror:
foo.c:4:2: error: 'j' is used uninitialized in this function
[-Werror=uninitialized]
And with -fno-diagnostics-show-option the [-W...] message is not printed.
Tobias