libstdc++/2311: isnan(), isinf(), etc, not undefined
pcarlini@unitus.it
pcarlini@unitus.it
Sat Mar 17 08:46:00 GMT 2001
>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:
More information about the Gcc-bugs
mailing list