This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/14608] New: <iostream.h> nukes isfinite macro from <math.h>
- From: "zack at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Mar 2004 18:23:11 -0000
- Subject: [Bug libstdc++/14608] New: <iostream.h> nukes isfinite macro from <math.h>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
I will attach two test cases to this bug. The first test case was provided to
me by a customer; it is a cut-down version of a larger piece of code that did
need both <math.h> and <iostream.h>. The observed problem is that if both these
headers are included (in either order) in the same translation unit, the
isfinite macro (part of C99) is not available to subsequent code. If only
<math.h> is included, then isfinite is available.
The second test case is the workaround that I found for GCC 3.3.3. It does not
work with GCC 3.4, even with the obvious s/GLIBCPP/GLIBCXX/.
It should be noted that HPUX's libc does not implement all of C99, but it *does*
provide all of the C99 math functions - but isfinite() and friends are only
macros (which is allowed by C99). I don't know what the C++ standard specifies
in this area but it seems to me that QoI dictates that C++ programs be able to
use all the system-provided library facilities.
--
Summary: <iostream.h> nukes isfinite macro from <math.h>
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: zack at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: ia64-hp-hpux11.23
GCC host triplet: ia64-hp-hpux11.23
GCC target triplet: ia64-hp-hpux11.23
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14608