This is the mail archive of the gcc-bugs@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]
Other format: [Raw text]

[Bug libstdc++/14608] <iostream.h> nukes isfinite macro from <math.h>


------- 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


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