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

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jan 8 00:53:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=14608

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |redi at gcc dot gnu.org

--- Comment #13 from Jonathan Wakely <redi at gcc dot gnu.org> ---
<iostream.h> is long gone, but the problem still exists:

#include <math.h>
#include <cmath>

bool foo(double d) {
  return isfinite(d);
}

On most targets this fails with any -std mode, because <cmath> does #undef
isfinite but then only defines std::isfinite not ::isfinite.

I have a patch to fix it.


More information about the Gcc-bugs mailing list