This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
*Ping* patch, fortran] Warn about constant integer divisions
- From: Thomas Koenig <tkoenig at netcologne dot de>
- To: "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 21 Jun 2015 15:57:47 +0200
- Subject: *Ping* patch, fortran] Warn about constant integer divisions
- Authentication-results: sourceware.org; auth=none
- References: <557C3F76 dot 2000901 at netcologne dot de>
*ping*
https://gcc.gnu.org/ml/gcc-patches/2015-06/msg00966.html
> Hello world,
>
> the attached patch emits a warning for constant integer division.
> While correct according to the standard, I cannot really think
> of a legitimate reason why people would want to write 3/5 where
> they could have written 0 , so my preference would be to put
> this under -Wconversion (like in the attached patch).
>
> However, I am open to discussion on that. It is easy enough to
> change.
>
> Regression-tested. Opinions? Comments? Would somebody rather
> have -Wconversion-extra? OK for trunk?