aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2022-07-14 10:20:16 +0200
committerTom de Vries <tdevries@suse.de>2022-07-14 10:20:16 +0200
commit2df41bda2f80a1fbd443c44ee1bd54da579fc8a2 (patch)
treea92bf9694750d3e9d6b6cf0b9343bd4a3b04988e
parent14dd1080c6127e7ad7566598860a885aa244ff8d (diff)
downloadgdb-2df41bda2f80a1fbd443c44ee1bd54da579fc8a2.zip
gdb-2df41bda2f80a1fbd443c44ee1bd54da579fc8a2.tar.gz
gdb-2df41bda2f80a1fbd443c44ee1bd54da579fc8a2.tar.bz2
[gdb/build] Fix gdb build with gcc 4.8.5
When building gdb with gcc 4.8.5, we run into: ... In file included from /usr/include/c++/4.8/future:43:0, from gdbsupport/thread-pool.h:30, from gdb/dwarf2/cooked-index.h:33, from gdb/dwarf2/read.h:26, from gdb/dwarf2/abbrev-cache.c:21: /usr/include/c++/4.8/atomic: In instantiation of \ ‘_Tp std::atomic<_Tp>::load(std::memory_order) const [with _Tp = \ packed<dwarf_unit_type, 1ul>; std::memory_order = std::memory_order]’: gdb/dwarf2/read.h:332:44: required from here /usr/include/c++/4.8/atomic:208:13: error: no matching function for call to \ ‘packed<dwarf_unit_type, 1ul>::packed()’ _Tp tmp; ^ ... Fix this by adding the default constructor for packed. Tested on x86_64-linux, with gdb build with gcc 4.8.5.
-rw-r--r--gdbsupport/packed.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/gdbsupport/packed.h b/gdbsupport/packed.h
index cd331b5..3468cf4 100644
--- a/gdbsupport/packed.h
+++ b/gdbsupport/packed.h
@@ -31,6 +31,8 @@ template<typename T, size_t Bytes = sizeof (T)>
struct packed
{
public:
+ packed () noexcept = default;
+
packed (T val)
{
m_val = val;