This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, Fortran] PR 82018: -Wextra should imply -Wconversion-extra


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]