So I tried to do very precise math in C using a __float128
-type.
My code looks something like this:
#include <stdio.h>
int main() {
__float128 num;
}
I tried compiling it without any options like this:
gcc -o test test.c
The error I get is:
test.c:4:5: error: __float128 is not supported on this target
My gcc was installed using Homebrew on an x86 Macbook.
CodePudding user response:
My gcc was installed using Homebrew on an x86 Macbook.
You may have done that, but the gcc
that you ran to compile your test program is actually Apple clang disguised as GCC, as you'll see if you do gcc -v
. Apple clang doesn't support __float128, but the real GCC does. Do /usr/local/bin/gcc-11 -o test test.c
to use the real GCC that you installed, and then it should compile successfully.