[patch, fortran] Warn about constant integer divisions
Thomas Koenig
tkoenig@netcologne.de
Sat Jun 13 14:34:00 GMT 2015
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?
Regards
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p1.diff
Type: text/x-patch
Size: 575 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20150613/2b81e235/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: warn_conversion_8.f90
Type: text/x-fortran
Size: 156 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20150613/2b81e235/attachment-0001.bin>
More information about the Fortran
mailing list