Bug ID: 34090
           Summary: __float128 is not supported on x86_64-w64-windows-gnu
           Product: clang
           Version: 4.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs

I'm using clang and mingw-w64 from Linux and when trying to compile sources
which include <cmath> I get the following error:

dariost@MDM /tmp $ cat pi.cpp 
#include <cmath>
#include <iostream>

int main()
    std::cout << std::acos(-1.0) << std::endl;
    return 0;
dariost@MDM /tmp $ x86_64-w64-mingw32-clang++ -v pi.cpp 
clang version 4.0.1 (tags/RELEASE_401/final)
Target: x86_64-w64-windows-gnu
Thread model: posix
InstalledDir: /usr/bin
 "/usr/bin/clang-4.0" -cc1 -triple x86_64-w64-windows-gnu -emit-obj -mrelax-all
-disable-free -disable-llvm-verifier -discard-value-names -main-file-name
pi.cpp -mrelocation-model pic -pic-level 2 -mthread-model posix -fmath-errno
-masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64
-momit-leaf-frame-pointer -v -dwarf-column-info -debugger-tuning=gdb
-nostdsysteminc -nobuiltininc -resource-dir /usr/bin/../lib/clang/4.0.1
-isystem /usr/bin/../lib/clang/4.0.1/include -isystem
/usr/x86_64-w64-mingw32/include/c++/7.1.1 -isystem
/usr/x86_64-w64-mingw32/include/c++/7.1.1/x86_64-w64-mingw32 -isystem
/usr/x86_64-w64-mingw32/include -fdeprecated-macro -fdebug-compilation-dir /tmp
-ferror-limit 19 -fmessage-length 132 -fno-use-cxa-atexit -fobjc-runtime=gcc
-fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o
/tmp/pi-a4508d.o -x c++ pi.cpp
clang -cc1 version 4.0.1 based upon LLVM 4.0.1 default target
#include "..." search starts here:
#include <...> search starts here:
End of search list.
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
2 errors generated.

I think the issue is that the libstdc++ which comes with GCC 7.1.1 enables
__float128, and clang doesn't support it for the Windows targets

The associated wclang issue on github is

You are receiving this mail because:
You are on the CC list for the bug.
llvm-bugs mailing list

Reply via email to