From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from barracuda.ebox.ca (barracuda.ebox.ca [96.127.255.19]) by sourceware.org (Postfix) with ESMTPS id 9D887387085C for ; Sun, 28 Jun 2020 16:56:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 9D887387085C X-ASG-Debug-ID: 1593363388-0c856e14ef1a7be0001-fS2M51 Received: from smtp.ebox.ca (smtp.ebox.ca [96.127.255.82]) by barracuda.ebox.ca with ESMTP id l4lsIszfy9an24SY (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 28 Jun 2020 12:56:28 -0400 (EDT) X-Barracuda-Envelope-From: simon.marchi@polymtl.ca X-Barracuda-RBL-Trusted-Forwarder: 96.127.255.82 Received: from localhost.localdomain (173-246-6-90.qc.cable.ebox.net [173.246.6.90]) by smtp.ebox.ca (Postfix) with ESMTP id CD86F441B21; Sun, 28 Jun 2020 12:56:28 -0400 (EDT) From: Simon Marchi X-Barracuda-Effective-Source-IP: 173-246-6-90.qc.cable.ebox.net[173.246.6.90] X-Barracuda-Apparent-Source-IP: 173.246.6.90 X-Barracuda-RBL-IP: 173.246.6.90 To: gdb-patches@sourceware.org Subject: [PATCH 0/3] Small cleanups in macro code Date: Sun, 28 Jun 2020 12:56:25 -0400 X-ASG-Orig-Subj: [PATCH 0/3] Small cleanups in macro code Message-Id: <20200628165628.96730-1-simon.marchi@polymtl.ca> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Barracuda-Connect: smtp.ebox.ca[96.127.255.82] X-Barracuda-Start-Time: 1593363388 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://96.127.255.19:443/cgi-mod/mark.cgi X-Barracuda-Scan-Msg-Size: 1169 X-Virus-Scanned: by bsmtpd at ebox.ca X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=8.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.82869 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Spam-Status: No, score=-10.2 required=5.0 tests=BAYES_00, KAM_DMARC_QUARANTINE, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_SOFTFAIL, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Sun, 28 Jun 2020 16:56:31 -0000 I am trying to fix this warning given by clang-10, which points out that we have a user-defined destructor in class macro_buffer, but no user-defined copy constructor: CXX macroexp.o /home/simark/src/binutils-gdb/gdb/macroexp.c:125:3: error: definition of implicit copy constructor for 'macro_buffer' is deprecated because it has a user-declared destructor [-Werror,-Wdeprecated-copy-dtor] ~macro_buffer () ^ I still have not managed to untangle this code, but I came up with this small cleanups which should be quite obvious. Simon Marchi (3): gdb: remove callback in macro expand functions gdb: make macro_expand_next return a gdb::unique_xmalloc_ptr gdb: make macro_stringify return a gdb::unique_xmalloc_ptr gdb/c-exp.y | 19 +++++--------- gdb/macrocmd.c | 22 ++++++++-------- gdb/macroexp.c | 67 +++++++++++++++++++----------------------------- gdb/macroexp.h | 59 ++++++++++++++++-------------------------- gdb/macroscope.c | 14 +++++----- gdb/macroscope.h | 9 +++---- gdb/macrotab.c | 14 +++------- 7 files changed, 79 insertions(+), 125 deletions(-) -- 2.27.0