From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1649 invoked by alias); 24 Aug 2014 12:38:03 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 1619 invoked by uid 89); 24 Aug 2014 12:38:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: edge10.ethz.ch Received: from edge10.ethz.ch (HELO edge10.ethz.ch) (82.130.75.186) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sun, 24 Aug 2014 12:37:59 +0000 Received: from CAS20.d.ethz.ch (172.31.51.110) by edge10.ethz.ch (82.130.75.186) with Microsoft SMTP Server (TLS) id 14.3.195.1; Sun, 24 Aug 2014 14:37:49 +0200 Received: from MBX23.d.ethz.ch ([fe80::68b6:1e46:3e74:b8fd]) by CAS20.d.ethz.ch ([fe80::2cd8:4907:7776:c56d%10]) with mapi id 14.03.0195.001; Sun, 24 Aug 2014 14:37:55 +0200 From: "VandeVondele Joost" To: "gcc-patches@gcc.gnu.org" , "fortran@gcc.gnu.org" Subject: [PATCH] PR fortran/62245 fix INT docs. Date: Sun, 24 Aug 2014 12:38:00 -0000 Message-ID: <908103EDB4893A42920B21D3568BFD9312F37DC4@MBX23.d.ethz.ch> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-SW-Source: 2014-08/txt/msg02280.txt.bz2 A doc change to refine wording for result value of int, avoiding the word r= ange and using magnitude as does the standard. Mentions undefined behavior. 2014-08-24 Joost VandeVondele PR fortran/62245 * intrinsic.texi (INT): clarify result and undefined behavior. Index: intrinsic.texi =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 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) =3D A}=20 @item (B) If @var{A} is of type @code{REAL} and @math{|A| < 1}, @code{INT(A)} equals= @code{0}.=20 -If @math{|A| \geq 1}, then @code{INT(A)} equals the largest integer that d= oes not exceed=20 -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 th= e 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 o= f @var{A}. @end table