Loop in cmath
Andrea Venturoli
ml at netfence.it
Fri May 19 08:08:57 PDT 2006
Hello.
This is on a 5.4p13 i386 box; from /usr/include/c++/3.4/cmath:
...
#if _GLIBCXX_USE_C99_MATH
#if !_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC
namespace __gnu_cxx
{
...
template<typename _Tp>
int
__capture_isnan(_Tp __f) { return isnan(__f); }
...
}
...
#undef isnan
...
#endif /* _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC */
#endif
#if _GLIBCXX_USE_C99_MATH
#if !_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC
namespace __gnu_cxx
{
...
template<typename _Tp>
int
isnan(_Tp __f) { return __capture_isnan(__f); }
...
}
namespace std
{
...
using __gnu_cxx::isnan;
}
#endif /* _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC */
#endif
This results in any call to std::isnan looping thorugh the two above
functions.
Is this a bug? Should any macro be defined to avoid this?
bye & Thanks
av.
More information about the freebsd-questions
mailing list