This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/14608] <iostream.h> nukes isfinite macro from <math.h>
- From: "gdr at integrable-solutions dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Mar 2004 10:24:41 -0000
- Subject: [Bug libstdc++/14608] <iostream.h> nukes isfinite macro from <math.h>
- References: <20040316182307.14608.zack@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From gdr at integrable-solutions dot net 2004-03-17 10:24 -------
Subject: Re: <iostream.h> nukes isfinite macro from <math.h>
"zack at codesourcery dot com" <gcc-bugzilla@gcc.gnu.org> writes:
| Further comments from the customer ...
|
| >From: "Zack Weinberg" <zack@codesourcery.com>
| >Dennis is not far off. What's happening is that <iostream> includes
| ><cmath>. <cmath> includes <math.h> and then #undefs a bunch of macros
| >that a strict reading of C++98 disallows, including "isfinite".
|
| Strict reading of C++98 would also disallow you undefing user macros
| just to make the namespace clean.
Strict reading of C++98 requires that the following program compile,
if it fails then it is V3 error:
#include <cmath>
namespace foo {
void isfinite(int) { return 0; }
}
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14608