This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

libstdc++/2311: isnan(), isinf(), etc, not undefined



>Number:         2311
>Category:       libstdc++
>Synopsis:       isnan(), isinf(), etc, not undefined
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Mar 17 08:46:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Paolo Carlini
>Release:        3.1 20010314 (experimental) and Codesourcery online test
>Organization:
>Environment:
Glibc2.2.2, Linux2.2.18, i686
>Description:
The following code snippet:

#include <cmath>
void isnan (int a, int b) { } 

does not compile. On the other hand, the following does:

#include <cmath>
void cos (int a, int b) { }
>How-To-Repeat:
Due to this behavior, the current blitz snapshot (blitz-20001213) cannot be compiled.
>Fix:
I believe that a few more macros defined in <math.h> (in particular those concerning the floating point categories), should be undefined at the beginning of std_cmath.h.
Indeed, adding and #undef isnan line in std_cmath.h leads to a successful compilation of the testcase above; the blitz library also compiles.
(however, for apparently unrelated reasons, the make check stops due to an ICE during the compilation of the extract.cpp testcase)


 
>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]