<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 - <future> failed to compile with g++ -frounding-math since 11"
href="https://bugs.llvm.org/show_bug.cgi?id=47900">47900</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td><future> failed to compile with g++ -frounding-math since 11
</td>
</tr>
<tr>
<th>Product</th>
<td>libc++
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</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>All Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>yichen.yan@inf.ethz.ch
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, mclow.lists@gmail.com
</td>
</tr></table>
<p>
<div>
<pre>In llvm 11/latest
root@34a1f2bc0406:/test# g++ --version
g++ (Debian 8.3.0-6) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
root@34a1f2bc0406:/test# g++ -nostdinc++ -I/llvm-install/include/c++/v1
-frounding-math -c test.cc -o /dev/null
In file included from /llvm-install/include/c++/v1/__threading_support:14,
from /llvm-install/include/c++/v1/atomic:571,
from /llvm-install/include/c++/v1/memory:681,
from /llvm-install/include/c++/v1/algorithm:643,
from /llvm-install/include/c++/v1/__string:57,
from /llvm-install/include/c++/v1/string_view:175,
from /llvm-install/include/c++/v1/string:506,
from /llvm-install/include/c++/v1/system_error:149,
from /llvm-install/include/c++/v1/future:365,
from test.cc:1:
/llvm-install/include/c++/v1/chrono: In function 'void
std::__1::this_thread::sleep_for(const std::__1::chrono::duration<_Rep,
_Period>&)':
/llvm-install/include/c++/v1/thread:370:73: in 'constexpr' expansion of
'std::__1::chrono::duration<long double>(std::__1::chrono::duration<long long
int, std::__1::ratio<1, 1000000000> >::max(), 0)'
/llvm-install/include/c++/v1/chrono:1093:64: in 'constexpr' expansion of
'std::__1::chrono::duration_cast<std::__1::chrono::duration<long double>, long
long int, std::__1::ratio<1, 1000000000> >(__d)'
/llvm-install/include/c++/v1/chrono:945:67: in 'constexpr' expansion of
'std::__1::chrono::__duration_cast<std::__1::chrono::duration<long long int,
std::__1::ratio<1, 1000000000> >, std::__1::chrono::duration<long double>,
std::__1::ratio<1, 1000000000>, true,
false>().std::__1::chrono::__duration_cast<std::__1::chrono::duration<long long
int, std::__1::ratio<1, 1000000000> >, std::__1::chrono::duration<long double>,
std::__1::ratio<1, 1000000000>, true, false>::operator()(__fd)'
/llvm-install/include/c++/v1/chrono:906:59: error: '(9.223372036854775807e+18 /
1.0e+9)' is not a constant expression
static_cast<_Ct>(__fd.count()) /
static_cast<_Ct>(_Period::den)));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
root@34a1f2bc0406:/test# cat test.cc
#include <future></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>