From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27660 invoked by alias); 22 Mar 2005 20:53:01 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 27602 invoked by uid 48); 22 Mar 2005 20:52:56 -0000 Date: Tue, 22 Mar 2005 20:53:00 -0000 Message-ID: <20050322205256.27599.qmail@sourceware.org> From: "jsm28 at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050213054900.19933.casevh@comcast.net> References: <20050213054900.19933.casevh@comcast.net> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug target/19933] Problem with define of HUGE_VAL in math_c99. X-Bugzilla-Reason: CC X-SW-Source: 2005-03/txt/msg02663.txt.bz2 List-Id: ------- Additional Comments From jsm28 at gcc dot gnu dot org 2005-03-22 20:52 ------- The following definitions should replace the Solaris ones outright for GCC. This has been reported to Sun, so fixes for these should be disabled for any future header mentioning __GNUC__. #define HUGE_VAL (__builtin_huge_val()) #define HUGE_VALF (__builtin_huge_valf()) #define HUGE_VALL (__builtin_huge_vall()) #define INFINITY (__builtin_inff()) #define NAN (__builtin_nanf("")) #define isgreater(x, y) __builtin_isgreater(x, y) #define isgreaterequal(x, y) __builtin_isgreaterequal(x, y) #define isless(x, y) __builtin_isless(x, y) #define islessequal(x, y) __builtin_islessequal(x, y) #define islessgreater(x, y) __builtin_islessgreater(x, y) #define isunordered(u, v) __builtin_isunordered(u, v) __builtin_isinf and __builtin_signbit are not currently entirely suited to the uses to which they are being put. For __builtin_isinf this is bug 20558. For __builtin_signbit, it ought to be type-generic but avoid falling back to the wrong function or a function the library does not have. (The Solaris libc doesn't seem to have isinf or signbit library functions.) GCC does not yet have __builtin_isfinite or __builtin_isnormal functions; they would be generically useful additions if they always avoided falling back to a library function. __builtin_fpclassify would also be useful but would only be usable where GCC is configured to know the FP_* values used on a given target. In principle all the macros can be defined along the lines of the isnan/isfinite/isinf definitions in libgcc2.c, with GNU extensions to avoid multiple evaluation, but this is not very efficient. -- What |Removed |Added ---------------------------------------------------------------------------- CC| |ro at techfak dot uni- | |bielefeld dot de, jsm28 at | |gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19933