https://bugs.kde.org/show_bug.cgi?id=429952
Bug ID: 429952
Summary: Errors when building regtest with clang
Product: valgrind
Version: unspecified
Platform: Compiled Sources
OS: Linux
Status: REPORTED
Severity: minor
Priority: NOR
Component: general
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Created attachment 133826
--> https://bugs.kde.org/attachment.cgi?id=133826&action=edit
Suggested patch
Tested with
Fedora 33 amd64
clang version 11.0.0 (Fedora 11.0.0-2.fc33)
When building the regression tests with clang, drd/tests/std_thread fails to
compile as follows:
std_thread.cpp:31:16: error: no type named '_Impl_base' in 'std::thread'
std::thread::_Impl_base* __t = static_cast<std::thread::_Impl_base*>(__p);
[plus more errors]
The reason is that this test uses "_Impl_base", which as the name implies is an
internal implementation-specific name used in libstdc++, GCC's default C++
library implementation. clang++ can either use libc++, which does not have
_Impl_base, or it can use libstdc++. In the case of libstdc++, std_thread.cpp
contains the macro check
#if defined(__GNUC__) && __GNUC__ -0 < 6
which is true with clang++ which sets __GNUC__ to 4.
However, the libstdc++ protects _Impl_base with
#if _GLIBCXX_THREAD_ABI_COMPAT
The same problem applies to std_thread2.cpp
Build can be fixed with the attached patch.
--
You are receiving this mail because:
You are watching all bug changes.