From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6597 invoked by alias); 15 Apr 2004 17:50:56 -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 6573 invoked from network); 15 Apr 2004 17:50:55 -0000 Received: from unknown (HELO mgr2.xmission.com) (198.60.22.202) by sources.redhat.com with SMTP; 15 Apr 2004 17:50:55 -0000 Received: from [198.60.22.201] (helo=mgr1.xmission.com) by mgr2.xmission.com with esmtp (Exim 3.35 #1) id 1BEB0n-0005yX-02; Thu, 15 Apr 2004 11:50:53 -0600 Received: from [198.60.22.20] (helo=xmission.xmission.com) by mgr1.xmission.com with esmtp (Exim 4.30) id 1BEB0n-0003zv-RI; Thu, 15 Apr 2004 11:50:53 -0600 Received: from llewelly by xmission.xmission.com with local (Exim 3.35 #1 (Debian)) id 1BEB0n-0000if-00; Thu, 15 Apr 2004 11:50:53 -0600 To: JOLY Loic Cc: gcc-help@gcc.gnu.org References: <407EC676.5040103@renault.com> From: llewelly@xmission.com Date: Thu, 15 Apr 2004 17:50:00 -0000 In-Reply-To: <407EC676.5040103@renault.com> Message-ID: User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.2 MIME-Version: 1.0 Subject: Re: Support for IEEE754 Content-Type: text/plain; charset=us-ascii X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on mgr1.xmission.com X-Spam-Level: X-Spam-Status: No, hits=0.3 required=8.0 tests=NO_REAL_NAME autolearn=no version=2.63 X-SA-Exim-Mail-From: llewelly@xmission.com X-SA-Exim-Version: 3.1 (built Wed Aug 20 09:38:54 PDT 2003) X-SA-Exim-Scanned: Yes X-SW-Source: 2004-04/txt/msg00198.txt.bz2 JOLY Loic writes: > Hello, > > I recently tried the following code (platform : PC/Linux, gcc version 3.2) : > > #include > #include > > using namespace std; > > int main(int argc, char *argv[]) > { > cout << "is IEEE754 = " << numeric_limits::is_iec559< cout << "has infinity = " << numeric_limits::has_infinity< > cout << "infinity > 100 ? " << > (numeric_limits::infinity() >100) < cout << "infinity= " <::infinity()< > return 1; > } > > It shows that gcc does not handle the IEEE 754 standard on this > platform, even if support for this standard is available on this > processor (The same program run on win/mscv on the same computer shows > handling for IEEE754). > > Is there any compiler flag, or anything, to make gcc compatible with > this standard? Yes; get a current version of gcc. Compiled with gcc 3.3.3, your program prints: is IEEE754 = 1 has infinity = 1 infinity > 100 ? 1 infinity= inf which shows that it implements IEEE754 at least well enough to pass the trivial test you used on the other compiler. > Is there any (good) reason why gcc is not and will > never be compliant? It has always been the intent of the gcc team to implement relevant standards such as IEEE754, ISO 14882, posix, etc. However these standards are extrodinarily complex, and like other implementors, the gcc team has finite resources. If you find any bugs, please report them, see gcc.gnu.org/bugs.html . They will be pleased if you do, and make every effort to fix them. So 'will never' has always been false, and 'is not' is false at least with respect to your test case. (though other bugs remain) The result is that you appear to be either deliberately insulting, grossly ignorant, or both. So in the future, please avoid statements that appear to make such statements.