Invalid change of value conversion warning message
William Clodius
williamclodius@gmail.com
Tue May 3 04:25:00 GMT 2016
The file
module test_int
use, intrinsic:: iso_fortran_env
integer(int64), parameter :: &
e18 = 1000000000000000000_int64, &
e19 = ( -huge(1_int64) + &
(e18-223372036854775807_int64) &
) - 2
end module test_int
when compiled using
fortran -std=f2008 -fmax-errors=10 -Wall -Wimplicit-interface -O3 -fbacktrace -fwhole-file -I mod_dir -c -o test_int.o test_int.f90
on Mac OS X version 10.11.4
with version
gfortran --version
GNU Fortran (GCC) 6.1.0
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
produces the message
test_int.f90:5:11:
e18 = 1000000000000000000_int64, &
1
Warning: Change of value in conversion from ‘INTEGER(8)’ to ‘REAL(4)’ at (1) [-Wconversion]
Putting in an
implicit none
statement doesn’t change the message.
More information about the Fortran
mailing list