This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/42809] Too much noise with -Wconversion
- From: "anlauf at gmx dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Jan 2010 22:59:27 -0000
- Subject: [Bug fortran/42809] Too much noise with -Wconversion
- References: <bug-42809-6318@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from anlauf at gmx dot de 2010-01-19 22:59 -------
(In reply to comment #1)
> Well constants don't really need to be warned about if it does fit. But really
> an generic integer(4) to real(4) should be warned about really as not all
> integer(4) fit into real(4).
>
That's right. For the conversion of a non-trivial integer(4) expression to
real(4) warnings are desired. But for a known integer(4), one could use
the knowledge of the Fortran model of reals a check whether the modulus
of the integer is smaller than 2/epsilon(0._4).
(I hope that I got the factor of two correctly).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42809