From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2205) id 6C9003851C1E; Thu, 14 Jul 2022 08:20:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6C9003851C1E Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom de Vries To: gdb-cvs@sourceware.org Subject: [binutils-gdb] [gdb/build] Fix gdb build with gcc 4.8.5 X-Act-Checkin: binutils-gdb X-Git-Author: Tom de Vries X-Git-Refname: refs/heads/master X-Git-Oldrev: 14dd1080c6127e7ad7566598860a885aa244ff8d X-Git-Newrev: 2df41bda2f80a1fbd443c44ee1bd54da579fc8a2 Message-Id: <20220714082020.6C9003851C1E@sourceware.org> Date: Thu, 14 Jul 2022 08:20:20 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jul 2022 08:20:20 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D2df41bda2f80= a1fbd443c44ee1bd54da579fc8a2 commit 2df41bda2f80a1fbd443c44ee1bd54da579fc8a2 Author: Tom de Vries Date: Thu Jul 14 10:20:16 2022 +0200 [gdb/build] Fix gdb build with gcc 4.8.5 =20 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 \ =E2=80=98_Tp std::atomic<_Tp>::load(std::memory_order) const [with _T= p =3D \ packed; std::memory_order =3D std::memory_order= ]=E2=80=99: gdb/dwarf2/read.h:332:44: required from here /usr/include/c++/4.8/atomic:208:13: error: no matching function for cal= l to \ =E2=80=98packed::packed()=E2=80=99 _Tp tmp; ^ ... =20 Fix this by adding the default constructor for packed. =20 Tested on x86_64-linux, with gdb build with gcc 4.8.5. Diff: --- gdbsupport/packed.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gdbsupport/packed.h b/gdbsupport/packed.h index cd331b5477d..3468cf44207 100644 --- a/gdbsupport/packed.h +++ b/gdbsupport/packed.h @@ -31,6 +31,8 @@ template struct packed { public: + packed () noexcept =3D default; + packed (T val) { m_val =3D val;