From: "VandeVondele Joost" <joost.vandevondele@mat.ethz.ch>
To: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
"fortran@gcc.gnu.org" <fortran@gcc.gnu.org>
Subject: [PATCH] PR fortran/62245 fix INT docs.
Date: Sun, 24 Aug 2014 12:38:00 -0000 [thread overview]
Message-ID: <908103EDB4893A42920B21D3568BFD9312F37DC4@MBX23.d.ethz.ch> (raw)
A doc change to refine wording for result value of int, avoiding the word range and using magnitude as does the standard. Mentions undefined behavior.
2014-08-24 Joost VandeVondele <vondele@gcc.gnu.org>
PR fortran/62245
* intrinsic.texi (INT): clarify result and undefined behavior.
Index: intrinsic.texi
===================================================================
--- intrinsic.texi (revision 214408)
+++ intrinsic.texi (working copy)
@@ -7371,8 +7371,10 @@ the following rules:
If @var{A} is of type @code{INTEGER}, @code{INT(A) = A}
@item (B)
If @var{A} is of type @code{REAL} and @math{|A| < 1}, @code{INT(A)} equals @code{0}.
-If @math{|A| \geq 1}, then @code{INT(A)} equals the largest integer that does not exceed
-the range of @var{A} and whose sign is the same as the sign of @var{A}.
+If @math{|A| \geq 1}, then @code{INT(A)} is the integer whose magnitude is the largest
+integer that does not exceed the magnitude of @var{A} and whose sign is the same as
+the sign of @var{A}. The result is undefined if it can not be represented as an
+@code{INTEGER} of the given @code{KIND}.
@item (C)
If @var{A} is of type @code{COMPLEX}, rule B is applied to the real part of @var{A}.
@end table
next reply other threads:[~2014-08-24 12:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-24 12:38 VandeVondele Joost [this message]
2014-08-24 12:44 ` Gerald Pfeifer
2014-08-24 12:47 ` VandeVondele Joost
2014-08-24 15:49 ` Steve Kargl
2014-08-24 15:58 ` VandeVondele Joost
2014-08-24 16:56 ` Steve Kargl
2014-08-24 17:12 ` VandeVondele Joost
2014-09-05 11:16 ` VandeVondele Joost
2014-09-05 13:34 ` Steve Kargl
2014-09-05 13:40 ` VandeVondele Joost
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=908103EDB4893A42920B21D3568BFD9312F37DC4@MBX23.d.ethz.ch \
--to=joost.vandevondele@mat.ethz.ch \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@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).