From: William Clodius <williamclodius@gmail.com>
To: fortran@gcc.gnu.org
Subject: Invalid change of value conversion warning message
Date: Tue, 03 May 2016 04:25:00 -0000 [thread overview]
Message-ID: <95B4C2FE-DFA0-4399-B0A4-EC6861AA95E5@icloud.com> (raw)
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.
next reply other threads:[~2016-05-03 4:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-03 4:25 William Clodius [this message]
2016-05-04 16:58 Dominique d'Humières
2016-05-05 2:34 ` William Clodius
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=95B4C2FE-DFA0-4399-B0A4-EC6861AA95E5@icloud.com \
--to=williamclodius@gmail.com \
--cc=fortran@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).