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: Janus Weil <janus at gcc dot gnu dot org>
- To: gfortran <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>, Thomas Koenig <tkoenig at netcologne dot de>
- Date: Mon, 18 Sep 2017 11:39:59 +0200
- Subject: Re: [Patch, Fortran] PR 82018: -Wextra should imply -Wconversion-extra
- Authentication-results: sourceware.org; auth=none
- References: <CAKwh3qim6+Twqx9tKuOh_w8o7MTEhYB0UKruKvh2=9UxwhkFkQ@mail.gmail.com>
> As a sidenote, I made an observation that is not directly related to
> the patch: The second warning in the test case, on "i4 = i8" shows
> [-Wconversion] when compiled with -Wall, but [-Wconversion-extra] when
> compiled with -Wextra. Does anyone understand how that inconsistency
> comes about?
Btw, this is probably due to constructs like:
if ((warn_conversion || warn_conversion_extra) ...
which occur in a few places in arith.c. In this sense, the
documentation is apparently not fully correct, claiming that
-Wconversion-extra does not imply -Wconversion? It probably does not
do so for all warnings, but for some of them it does apparently?
Maybe it would be clearer to just make -Wconversion-extra imply
-Wconversion (and document that), in order to avoid confusion?
Cheers,
Janus