From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 92FE8396D83F for ; Wed, 16 Nov 2022 21:15:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 92FE8396D83F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca Received: from [172.16.0.64] (192-222-180-24.qc.cable.ebox.net [192.222.180.24]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 4DAB11E11E; Wed, 16 Nov 2022 16:15:18 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1668633319; bh=RGYPbLd+9UE+7e6MuqB3fAukMC2kuxGRGPfqJ4IJni4=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=pEI0CDnAsJAs8aGzB7B9iJ0AsUCL//pspAp1BIxHr28cw3lrwBDbmp902vxP6CXyg /x+07TuUOOwSDMb5A7bUeIPUZV5eGTeOmoZjlNIBYx51Y9A3Bl8ntzDMQNCYVoG300 s8bovhy1Np28y2+VJVlChvUJcDv5ZcRferf9s5qI= Message-ID: Date: Wed, 16 Nov 2022 16:15:17 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Subject: Re: [PATCH] Change NULL to nullptr in gdb/infcmd.c and gdb/infrun.c Content-Language: fr To: Carl Love , Lancelot SIX Cc: Ulrich Weigand , "gdb-patches@sourceware.org" , "tdevries@suse.de" , "kevinb@redhat.com" , "will_schmidt@vnet.ibm.com" , "blarsen@redhat.com" References: <2db5ad69b32f4cda9c53b252ad37cd783f827c14.camel@de.ibm.com> <7f476265-c6a9-9fcf-ce13-ff550ea5e6f6@suse.de> <6ed2cf1714e5b8dc386e66b634b540efdf828ed5.camel@de.ibm.com> <2466b7efc91dd4964add9a0d7ce4cd47678f5800.camel@us.ibm.com> <6cb9fd038eefd825bd0e66c80da3771e4a512b68.camel@us.ibm.com> <20221116101958.aadx4r5f72ub2emw@ubuntu.lan> <38d11744f018cea8d85ed2db1c5767f8253c3d9b.camel@us.ibm.com> From: Simon Marchi In-Reply-To: <38d11744f018cea8d85ed2db1c5767f8253c3d9b.camel@us.ibm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 11/16/22 15:55, Carl Love wrote: > Lancelot, GDB maintainers: > > The GDB coding style guide specifies that nullptr should be used > instead of NULL as noted by Lancelot for the recent patch "PowerPC, fix > support for printing the function return value for non-trivial > values.". This patch changes all of the various NULL statements to > nullptr statements in files gdb/infcmd.c and gdb/infrun.c per the > coding style guide. > > The patch does not make any functional changes to the code. > > The patch has been tested on both X86_64 and PowerPC to ensure there > were no new unexpected error, new core files generated, new unresolved > tests etc. > > Please let me know if this patch is acceptable. Thanks. > > Carl Love > > > ------------------------ > Change NULL to nullptr in gdb/infcmd.c and gdb/infrun.c > > The GDB coding standard specifies that nullptr should be used instead of NULL. > There are numerous uses of NULL and nullptr in files infcmd.c and infrun.c. > This patch replaces the various uses of NULL with nullptr in the source files. > The use of NULL in the comments was not changed. > > The patch does not introduce any functional changes. > > The patch has been tested on PowerPC and Intel X86_64 with no new unexpected > test failures, unresolved tests, new core files etc. Thanks, this LGTM: Approved-By: Simon Marchi I appreciate this kind of cleanup that bring the code in line with what the current recommended practices are. I was thinking the other day if we could do a mass find and replace from NULL to nullptr. I am a just a bit afraid that there might be instances we don't want to change, in comments or literal strings, so we have to be a bit more careful. Simon