public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] PR fortran/62245 fix INT docs.
@ 2014-08-24 12:38 VandeVondele  Joost
  2014-08-24 12:44 ` Gerald Pfeifer
  0 siblings, 1 reply; 10+ messages in thread
From: VandeVondele  Joost @ 2014-08-24 12:38 UTC (permalink / raw)
  To: gcc-patches, fortran

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






^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-09-05 13:40 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-24 12:38 [PATCH] PR fortran/62245 fix INT docs VandeVondele  Joost
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

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).