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

OS X/clang's math.h built-ins not supported #99

Open
kornelski opened this issue Dec 10, 2016 · 2 comments
Open

OS X/clang's math.h built-ins not supported #99

kornelski opened this issue Dec 10, 2016 · 2 comments

Comments

@kornelski
Copy link

#include <math.h>
~/.cabal/bin/corrode ./test.c
("/usr/include/math.h": line 205): illegal undefined variable; check whether a real C compiler accepts this:
    __builtin_fabsf

The header file looks like this:

__header_always_inline int __inline_isfinitef(float __x) {
    return __x == __x && __builtin_fabsf(__x) != __builtin_inff();
}

I have OS X 10.11 and clang Apple LLVM version 8.0.0 (clang-800.0.38), corrode b6699fb

@kornelski
Copy link
Author

Similar problem with #include <assert.h>, which expands to compiler-specific builtins:

illegal undefined variable; check whether a real C compiler accepts this:
__builtin_expect

@bluejekyll
Copy link

FYI, I hit a bunch of these in #109

For this adding the -ffast-math resolves it.

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

2 participants