Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The isnan() macro defined in include/mps/types.h breaks the build on FreeBSD 14 #38

Open
yurivict opened this issue Aug 25, 2023 · 0 comments

Comments

@yurivict
Copy link

libtool: compile:  cc -DHAVE_CONFIG_H -I. -I../.. -I../../include -I../../include -D_REENTRANT -Wall -DMPS_USE_BUILTIN_COMPLEX -DNICE_DEBUG -fno-math-errno -fomit-frame-pointer -D_MPS_PRIVATE -D_THREAD_SAFE -pthread -isystem /usr/local/include -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -MT common/parser.lo -MD -MP -MF common/.deps/parser.Tpo -c common/parser.c  -fPIC -DPIC -o common/.libs/parser.o
In file included from common/nroots-polynomial.cpp:11:
In file included from ../../include/mps/mps.h:99:
In file included from ../../include/mps/private/system/memory-file-stream.h:50:
In file included from /usr/include/c++/v1/iostream:43:
In file included from /usr/include/c++/v1/ios:221:
In file included from /usr/include/c++/v1/__locale:18:
In file included from /usr/include/c++/v1/mutex:191:
In file included from /usr/include/c++/v1/__memory/shared_ptr.h:42:
In file included from /usr/include/c++/v1/atomic:2669:
/usr/include/c++/v1/cmath:587:17: error: expected unqualified-id
    return std::isnan(__lcpp_x);
                ^
../../include/mps/types.h:27:3: note: expanded from macro 'isnan'
  (sizeof(x) == sizeof(long double) ? isnan_ld (x) \
  ^

You assume that isnan() has to be a macro or otherwise isnan() isn't defined. But isnan() can be a function too.

Please consider using std::isnan instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant