From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Karl Fogel Newsgroups: gmane.emacs.devel Subject: Checking before removing obsolete comment about memmove. Date: Sun, 28 Nov 2021 02:23:11 -0600 Message-ID: <87h7bwpu34.fsf@red-bean.com> Reply-To: Karl Fogel Mime-Version: 1.0 Content-Type: text/plain; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26832"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) To: Emacs Devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Nov 28 09:24:10 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mrFTl-0006oj-R2 for ged-emacs-devel@m.gmane-mx.org; Sun, 28 Nov 2021 09:24:10 +0100 Original-Received: from localhost ([::1]:43976 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mrFTk-00086g-HD for ged-emacs-devel@m.gmane-mx.org; Sun, 28 Nov 2021 03:24:08 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:43058) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mrFSu-0007R6-KX for emacs-devel@gnu.org; Sun, 28 Nov 2021 03:23:16 -0500 Original-Received: from sanpietro.red-bean.com ([45.79.25.59]:59328) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mrFSs-00026k-RX for emacs-devel@gnu.org; Sun, 28 Nov 2021 03:23:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=red-bean.com; s=202005newsp; h=Content-Type:MIME-Version:Message-ID:Date: Reply-To:Subject:To:From:Sender:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:In-Reply-To:References; bh=MIRSs/9Z846iMJ6rEmq1mqVdYWr2r/qCW6OQsPJUmqU=; t=1638087793; x=1639297393; b=gvA+1vJWKn0uVJeVaLJ8jsNgZsePl6JOHLgAyQi9wdL704B5DNe8lv9HIs1GXaEEUzmZJcoTjT+ 3mrHqE+SI/aHekp0UJ8mtcrU0fVyquPoHgxIDjQyqg0R/OP3nn+hnilq2AyUSORiS4ek0DLyPX+Rl OeZEJBGXug0JBvA8/uGyr28IxJrJ2cKRfYQp9fBvT/khSFz4Kn1HDE7x30Za87kSCeaZkWywDqWrb 7xQJiJ+KkzlCQZmSHHBZlDT9QnHz9EbdMZJvnKzPoeGocswmFcciUm7IW3LMW/cD0Ssa+X96D6D/T aP1quq+Rig9nd7G3O3ltxr6dm7GAaQF2F0lA==; Original-Received: from 99-112-125-163.lightspeed.cicril.sbcglobal.net ([99.112.125.163]:59744 helo=floss) by sanpietro.red-bean.com with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mrFSq-0038Ok-KI for emacs-devel@gnu.org; Sun, 28 Nov 2021 08:23:12 +0000 Received-SPF: pass client-ip=45.79.25.59; envelope-from=kfogel@red-bean.com; helo=sanpietro.red-bean.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:280386 Archived-At: In src/editfns.c, in Ftranspose_regions, I'd like to remove this obsolete comment: /* Working without memmove, for portability (sigh), so must be careful of overlapping subsections of the array... */ We now use memmove() in that function since [1], just as we now use memmove() in many other places in Emacs. (These days memmove() is assumed because C89 is assumed. This wasn't always the case. Searching backward for "memmove" from the bottom of src/ChangeLog.4 appears to show some temporary confusion at the time about whether memmove() was allowed, and if so how it would be provided; fortunately, that's all settled now.) The reason I'm posting to ask before removing that comment is that I'm not sure if we have an anti-churn policy against making commits that just fix comments. My preference is to fix it now, and not wait until the next time the actual code of Ftranspose_regions() needs to be changed, because it's an outright inaccuracy that might confuse the next reader. But if we've already decided to leave such things be until the next time someone is actually working in the code, that's fine and I'll abide by it (and would be happy to document it in CONTRIBUTE if people would like that). Best regards, -Karl [1] Namely, since this commit: commit 354f9f0fc6cc05ed98883447f9b2f37943d79160 Author: Fredrik Bergroth AuthorDate: Tue Feb 23 22:41:16 2016 +1100 Commit: Lars Ingebrigtsen CommitDate: Wed Feb 24 11:58:50 2016 +1100 Use memmove instead of memcpy on overlapping regions * src/editfns.c (Ftranspose_regions): Regions may overlap, so use memmove instead of memcpy (bug#19213).