tpoechtrager / wclang

Cross compile source code easily for Windows with clang on Linux/Unix

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error: __float128 is not supported on this target

dariost opened this issue · comments

When I try to compile this program:

#include <cmath>
#include <iostream>

int main()
{
    std::cout << std::acos(-1.0) << std::endl;
    return 0;
}

clang gives the following error:

In file included from pi.cpp:1:
In file included from /usr/x86_64-w64-mingw32/include/c++/7.1.1/cmath:47:
/usr/x86_64-w64-mingw32/include/c++/7.1.1/bits/std_abs.h:102:7: error: __float128 is not supported on this target
  abs(__float128 __x)
      ^
/usr/x86_64-w64-mingw32/include/c++/7.1.1/bits/std_abs.h:101:3: error: __float128 is not supported on this target
  __float128
  ^
2 errors generated.

Link to the clang bugzilla report: https://bugs.llvm.org/show_bug.cgi?id=34090

I can confirm that as of

$ x86_64-w64-mingw32-clang++ --version
clang version 6.0.0 (trunk 310202)
Target: x86_64-w64-windows-gnu
Thread model: posix
InstalledDir: /usr/bin

this issue has been fixed