<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - __float128 is not supported on x86_64-w64-windows-gnu target"
href="https://bugs.llvm.org/show_bug.cgi?id=34090">34090</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>__float128 is not supported on x86_64-w64-windows-gnu target
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>4.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>dario.ostuni@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>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
x86_64-unknown-linux-gnu
#include "..." search starts here:
#include <...> search starts here:
/usr/bin/../lib/clang/4.0.1/include
/usr/x86_64-w64-mingw32/include/c++/7.1.1
/usr/x86_64-w64-mingw32/include/c++/7.1.1/x86_64-w64-mingw32
/usr/x86_64-w64-mingw32/include
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
__float128
^
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
<a href="https://github.com/tpoechtrager/wclang/issues/31">https://github.com/tpoechtrager/wclang/issues/31</a></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>