[Bug fortran/35962] Should warn about precision loss on integer conversions in fortran
--- Comment #1 from burnus at gcc dot gnu dot org 2008-04-17 08:50 --- Can you try: -Wconversion Warn about implicit conversions between different types. It might be a bit verbose as it, e.g., also warns for complex(8) = real(8), which has no conversion problem, but otherwise it is ok. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35962
[Bug fortran/35962] Should warn about precision loss on integer conversions in fortran
--- Comment #2 from J dot Hogg at rl dot ac dot uk 2008-04-17 09:33 --- That seems to fix the original complaint with the following output: [EMAIL PROTECTED] ~/bugs/gfortran-4.3/ls_prec $ gfortran-4.3 -Wall -pedantic -Wconversion -o test test.f90 test.f90:10.20: lvar = 2_long**33 1 Warning: Conversion from INTEGER(4) to INTEGER(8) at (1) test.f90:16.20: lvar = 2_long**30 1 Warning: Conversion from INTEGER(4) to INTEGER(8) at (1) test.f90:11.10: svar = lvar 1 Warning: Conversion from INTEGER(8) to INTEGER(4) at (1) test.f90:17.10: svar = lvar 1 Warning: Conversion from INTEGER(8) to INTEGER(4) at (1) Apologies for wasting your time in that respect, though as you say it is a little verbose and a happy medium between the two would be appreciated. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35962
[Bug fortran/35962] Should warn about precision loss on integer conversions in fortran
--- Comment #3 from tkoenig at gcc dot gnu dot org 2008-04-17 22:00 --- This is pretty much addressed in PR 27866. Closing as a duplicate. *** This bug has been marked as a duplicate of 27866 *** -- tkoenig at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||DUPLICATE http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35962