From 63b87362a5800890ccc5ca8494a9e0443472ef99 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Thu, 17 Aug 2023 10:41:34 +0200 Subject: [PATCH] [gdb/build, c++20] Fix DISABLE_COPY_AND_ASSIGN use in ui_out_emit_type MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When building gdb with -std=c++20, I run into: ... include/ansidecl.h:342:9: error: expected unqualified-id before ‘const’ 342 | TYPE (const TYPE&) = delete; \ | ^~~~~ gdb/ui-out.h:412:3: note: in expansion of macro ‘DISABLE_COPY_AND_ASSIGN’ 412 | DISABLE_COPY_AND_ASSIGN (ui_out_emit_type); | ^~~~~~~~~~~~~~~~~~~~~~~ ... Fix this by using "DISABLE_COPY_AND_ASSIGN (ui_out_emit_type)". Tested on x86_64-linux. --- gdb/ui-out.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/ui-out.h b/gdb/ui-out.h index ba5b1de68ab..07567a1df35 100644 --- a/gdb/ui-out.h +++ b/gdb/ui-out.h @@ -409,7 +409,7 @@ public: m_uiout->end (Type); } - DISABLE_COPY_AND_ASSIGN (ui_out_emit_type); + DISABLE_COPY_AND_ASSIGN (ui_out_emit_type); private: -- 2.30.2