From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#65017: 29.1; Byte compiler interaction with cl-lib function objects, removes symbol-function Date: Tue, 8 Aug 2023 16:56:03 +0000 Message-ID: References: <8B08E514-B2D5-48F5-BA90-4F5A9492F8F9@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33116"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acm@muc.de, Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , 65017@debbugs.gnu.org, Eric Marsden To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 08 18:57:34 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1qTQ1U-0008Q2-Ur for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 08 Aug 2023 18:57:32 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qTQ13-0002bg-JH; Tue, 08 Aug 2023 12:57:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qTQ10-0002ac-Fs for bug-gnu-emacs@gnu.org; Tue, 08 Aug 2023 12:57:03 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qTQ10-0000C7-7W for bug-gnu-emacs@gnu.org; Tue, 08 Aug 2023 12:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qTQ0z-0006Az-RQ for bug-gnu-emacs@gnu.org; Tue, 08 Aug 2023 12:57:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Aug 2023 16:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65017 X-GNU-PR-Package: emacs Original-Received: via spool by 65017-submit@debbugs.gnu.org id=B65017.169151377223675 (code B ref 65017); Tue, 08 Aug 2023 16:57:01 +0000 Original-Received: (at 65017) by debbugs.gnu.org; 8 Aug 2023 16:56:12 +0000 Original-Received: from localhost ([127.0.0.1]:37630 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qTQ0C-00069n-Ev for submit@debbugs.gnu.org; Tue, 08 Aug 2023 12:56:12 -0400 Original-Received: from mx3.muc.de ([193.149.48.5]:59683) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qTQ0A-00069Z-Ij for 65017@debbugs.gnu.org; Tue, 08 Aug 2023 12:56:11 -0400 Original-Received: (qmail 30350 invoked by uid 3782); 8 Aug 2023 18:56:03 +0200 Original-Received: from acm.muc.de (pd953ac8f.dip0.t-ipconnect.de [217.83.172.143]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 08 Aug 2023 18:56:03 +0200 Original-Received: (qmail 8451 invoked by uid 1000); 8 Aug 2023 16:56:03 -0000 Content-Disposition: inline In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:266974 Archived-At: Hello, Stefan. On Mon, Aug 07, 2023 at 22:44:29 -0400, Stefan Monnier wrote: > > I suggest installing this patch into master. > LGTM, thanks. > >> > Stefan, it would still be nice for cl--labels-convert-cache to get > >> > initialised each time it gets used. > >> No, the problem is not initialization, as I pointed out. The problem is > >> that this `eq` should not consider a symbol equal to a sympos *ever* > >> (contrary to most other uses of `eq` in macros). > > Are you sure? > Yes. What about two SWPs with the same symbol but different positions? If they aren't considered EQ here, there will never be a match for the first arm of the cond form in cl--labels-convert; then cl--labels-convert-cache will get written, but never used. And if, somehow, it does get used (the current code, I think), then (as you write below) the argument F will get replaced by an F with the wrong position. Am I right, here? Why must the F get replaced by a different F? There must surely be a way, a simpler way than the current cl--labels-convert, to retain the current F (hence, not corrupting its position)? [ .... ] > > If cl--labels-convert-cache is being used > > inside the byte compiler, it surely needs to consider # > 42> and # as eq? > No, it should not treat them equal (when it does, it introduces an > incorrect sympos and can thus lead to error messages pointing at the > wrong place). Then isn't what is wrong here the introduction of the incorrect SWP rather than treating the two SWPs as EQ? This is obscure, difficult code. :-( We should think about committing a fix to the original bug, sometime, too. [ .... ] > Stefan -- Alan Mackenzie (Nuremberg, Germany).