From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by sourceware.org (Postfix) with ESMTPS id C1D683848591 for ; Thu, 14 Jul 2022 08:20:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C1D683848591 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 08638207B2 for ; Thu, 14 Jul 2022 08:20:58 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id E8A6813748 for ; Thu, 14 Jul 2022 08:20:57 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id PX16N+nRz2I7WQAAMHmgww (envelope-from ) for ; Thu, 14 Jul 2022 08:20:57 +0000 Date: Thu, 14 Jul 2022 10:20:56 +0200 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [committed][gdb/build] Fix gdb build with gcc 4.8.5 Message-ID: <20220714082054.GA21481@delia.home> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jul 2022 08:21:00 -0000 Hi, 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; 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::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. Committed to trunk. Thanks, - Tom [gdb/build] Fix gdb build with gcc 4.8.5 --- 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 = default; + packed (T val) { m_val = val;