[llvm-bugs] [Bug 47900] New: <future> failed to compile with g++ -frounding-math since 11

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Oct 19 05:12:11 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=47900

            Bug ID: 47900
           Summary: <future> failed to compile with g++ -frounding-math
                    since 11
           Product: libc++
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: All Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: yichen.yan at inf.ethz.ch
                CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com

In llvm 11/latest

root at 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 at 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 at 34a1f2bc0406:/test# cat test.cc
#include <future>

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20201019/ad3c7b67/attachment-0001.html>


More information about the llvm-bugs mailing list