From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4149 invoked by alias); 26 Feb 2002 17:35:21 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 3816 invoked from network); 26 Feb 2002 17:35:15 -0000 Received: from unknown (HELO adobe.com) (192.150.11.1) by sources.redhat.com with SMTP; 26 Feb 2002 17:35:15 -0000 Received: from inner-relay-2.corp.adobe.com ([153.32.1.52]) by adobe.com (1.0.0/8.11.4) with ESMTP id g1QHamp23865 for ; Tue, 26 Feb 2002 09:36:48 -0800 (PST) Received: from iplan-mn.corp.adobe.com (iplan-mn.corp.adobe.com [130.248.25.5]) by inner-relay-2.corp.adobe.com (8.11.4/8.11.4) with ESMTP id g1QHXnY09918 for ; Tue, 26 Feb 2002 09:33:49 -0800 (PST) Received: from adobe.com ([130.248.184.180]) by iplan-mn.corp.adobe.com (Netscape Messaging Server 4.15 mn Jul 11 2001 16:32:57) with ESMTP id GS5I6T00.QGL; Tue, 26 Feb 2002 11:35:17 -0600 Message-ID: <3C7BC7B8.800EDA9C@adobe.com> Date: Tue, 26 Feb 2002 11:11:00 -0000 From: John Love-Jensen X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Stephen Pisuk CC: gcc-help@gcc.gnu.org Subject: Re: Float to Int Conversions References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-02/txt/msg00276.txt.bz2 Hi Stephen, According to C++ Programming Language by Stroustrup, section C.6.2.6 -- the behavior is UNDEFINED (implementation dependent) if the truncated value cannot be represented in the destionation type. Not what you wanted to hear. If you want consistent behavior, you'll have to write a helper subroutine that catches the boundary cases. --Eljay