delorie.com/archives/browse.cgi | search |
X-Spam-Check-By: | sourceware.org |
From: | "Dave Korn" <dave DOT korn AT artimi DOT com> |
To: | "'Jeff Johnston'" <jjohnstn AT redhat DOT com>, |
"'Gabriel Dos Reis'" <gdr AT integrable-solutions DOT net> | |
Cc: | <cygwin AT cygwin DOT com>, <libstdc++@gcc.gnu.org>, <newlib AT sources DOT redhat DOT com> |
Subject: | RE: gcc-3.4.4-1: c++: cmath: calling std::isnan results in endless loop |
Date: | Mon, 27 Feb 2006 17:28:37 -0000 |
Message-ID: | <01db01c63bc3$3e12aa70$a501a8c0@CAM.ARTIMI.COM> |
MIME-Version: | 1.0 |
In-Reply-To: | <44033332.7020801@redhat.com> |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
On 27 February 2006 17:13, Jeff Johnston wrote: > Gabriel Dos Reis wrote: >> "Dave Korn" <dave DOT korn AT artimi DOT com> writes: >> >> [...] >> >>> It looks to me like the cygwin/newlib combination is not being >>> compliant if it implements isnan as a function rather than a macro. I >>> couldn't see anything in the standard that says it can be a function, and >>> every reference to it describes it as a macro, not a function. It may be >>> the case that libstdc++ is within its rights to assume that isnan is a >>> macro after all. >> >> yes, isnan and friends are supposed to be macros only, not functions. >> > > I'll start working on a newlib patch for this. Cheers Jeff, I didn't know if it was one of those bits where cygwin overrides the newlib way of doing things or if it was something we inherited verbatim from the newlib sources, but now I see that newlib implements it as a function (only) in s[f]_isnan.c. As far as I can see it should be fine to just rename the generic function (prepend an underscore or three) and make isXXXXX a macro that calls out to the appropriate type-based one based on typeof (if we're allowed GNU C extensions) or just by comparing the sizeof the input to the sizeof's the actual float types (if we aren't). cheers, DaveK -- Can't think of a witty .sigline today.... -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |