This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, Fortran] PR 82018: -Wextra should imply -Wconversion-extra
- From: Dominique d'Humières <dominiq at lps dot ens dot fr>
- To: Thomas Koenig <tkoenig at netcologne dot de>
- Cc: Janus Weil <janus at gcc dot gnu dot org>, gfortran <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 19 Sep 2017 22:26:52 +0200
- Subject: Re: [Patch, Fortran] PR 82018: -Wextra should imply -Wconversion-extra
- Authentication-results: sourceware.org; auth=none
- References: <D1304474-3CFE-4B8C-B323-A6635839F651@lps.ens.fr> <af3d90e5-ea50-852b-3cd6-24b6c3937b57@netcologne.de>
> Le 19 sept. 2017 à 21:59, Thomas Koenig <tkoenig@netcologne.de> a écrit :
>
> Am 18.09.2017 um 11:50 schrieb Dominique d'Humières:
>> Warning: Conversion from 'REAL(4)' to 'REAL(8)' at (1) [-Wconversion-extra]
>
> Not me (not in the general case)
>
>> even if may allow to detect things such as ‘pi8=acos(-1.0)’?
>
> This one would be interesting to catch (even with -Wall), although
> it would be hard to avoid false positives.
>
> I agree with Dominique that enabling -Wconversion-extra
> the way it is now would be too noisy.
>
> Are there warnings currently enabled with -Wconversion-extra
> which would be useful in -Wextra (or even ones currently not in
> -Wconversion-extra) without having too many false positives?
>
> r8 = 1./3. could be one example, r8=acos(-1.0) another. Something
> like "it must have been calculated with a formula and, if evaluated
> in the precision of the lhs, gives a different result from the one
> if the user had specified it with the correct precision".
>
> We don't do that yet, but I think it could be useful even with -Wall,
> and certainly with -Wextra.
>
> What do you think?
Is it really worth the trouble?
I am really upset by the time spent on warning at the expense of more serious problems.
Dominique