From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.bugs Subject: bug#69249: bug in native-compile? Date: Mon, 19 Feb 2024 02:48:58 -0500 Message-ID: References: <86h6i5r20h.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18311"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Robert Boyer , Stefan Monnier , rms@gnu.org, 69249@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 19 08:52:04 2024 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 1rbyRX-0004YZ-W3 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 19 Feb 2024 08:52:04 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rbyRD-0007Z0-2c; Mon, 19 Feb 2024 02:51:43 -0500 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 1rbyRB-0007YZ-8A for bug-gnu-emacs@gnu.org; Mon, 19 Feb 2024 02:51:41 -0500 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 1rbyRA-0003sw-MV for bug-gnu-emacs@gnu.org; Mon, 19 Feb 2024 02:51:40 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rbyRV-0007Ud-Jw for bug-gnu-emacs@gnu.org; Mon, 19 Feb 2024 02:52:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Feb 2024 07:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69249 X-GNU-PR-Package: emacs Original-Received: via spool by 69249-submit@debbugs.gnu.org id=B69249.170832911128787 (code B ref 69249); Mon, 19 Feb 2024 07:52:01 +0000 Original-Received: (at 69249) by debbugs.gnu.org; 19 Feb 2024 07:51:51 +0000 Original-Received: from localhost ([127.0.0.1]:40284 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rbyRK-0007UE-VC for submit@debbugs.gnu.org; Mon, 19 Feb 2024 02:51:51 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:45984) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rbyRI-0007U1-Eo for 69249@debbugs.gnu.org; Mon, 19 Feb 2024 02:51:49 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rbyOm-0003Ln-5f; Mon, 19 Feb 2024 02:49:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=lERvxmZOKtAuMgEHw0tItKGroaybjhPZQNIASnGYXY8=; b=e2VE/JocARbz7XmWFYIu oGD1UlRa7LHi/0JqyDLzfqVno1E8xcLTPvjZGIHQ2x+zkbCsPpEaedQAbUXdxg2DT20iMkUznf/sS nvAdyQRMfSmj/YpgGvOJDhS20XwH20lq9rxQWxLi1q0rF+0s4gIKW6m1HN/oAILwYhS5O5XaPyfWF ULHX7c1fxqwhrkUFD6MPSd6RHFGZLnSn+5jv8bYfqN8GV+z7RjabBdV3j2uAk4g+nY/hAJRYGh32q c9gV3YYSMPjB/WmzVRgFwbwT49ZuK5WlwPHH6spMlPShxSoNcfbIYsbJJMgCurbAK7WJ06I0bji03 eqitOI7q3FlLjA==; Original-Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1rbyOY-0004sz-4y; Mon, 19 Feb 2024 02:48:59 -0500 In-Reply-To: <86h6i5r20h.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 18 Feb 2024 21:44:14 +0200") 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:280236 Archived-At: Eli Zaretskii writes: >> Cc: rms@gnu.org >> From: Robert Boyer >> Date: Sat, 17 Feb 2024 22:26:27 -0600 >>=20 >> Here is a report on what seems to me to be a bug in native-compile. >>=20 >> ---------------------------------------------------------------------- >>=20 >> ;; Let us suppose that this is the file "compile-bug.el" >>=20 >> ;; Invoking (native-compile "compile-bug.el") should work, I do believe. >> ;; However it fails and the error message is printed below. >>=20 >> ;; It cannot be emphasized enough how serious this problem seems to me, = Bob >> ;; Boyer, robertstephenboyer@gmail.com. >>=20 >> ;; The reason it is so SERIOUS is that ANY Lisp compiler would need to be >> ;; delighted to see such a typing expression as >>=20 >> ;; (declare (fixnum start end) (vector input scratch)) >>=20 >> ;; Why? BECAUSE it means that the compiler does not have to lay down cod= e to >> ;; type check the type of start, end, input, and scratch!!!! >>=20 >> ;; However, (native-compile "compile-bug.el") results in the following e= rror message: >>=20 >> ;; Compiling file /mnt/chromeos/GoogleDrive/MyDrive/Linux/working/compil= e-bug.el at Fri Feb 16 08:25:19 >> 2024 >> ;; compile-bug.el:2:45: Warning: Unknown defun property =E2=80=98fixnum= =E2=80=99 in foo >> ;; compile-bug.el:2:45: Warning: Unknown defun property =E2=80=98vector= =E2=80=99 in foo >>=20 >> (defun foo (start end input scratch) >> (declare (fixnum start end) (vector input scratch)) >> (list start end input scratch)) >>=20 >> ;; foo works fine >>=20 >> ;; Here is an example form for the invocation of foo: >>=20 >> ;; (foo 1 2 (make-vector 3 4) (make-vector 5 6)) >>=20 >> ;; That form runs ok if it is running with foo interpreted. >>=20 >> ;; (byte-compile 'foo) runs ok. >>=20 >> ;; One can run the same form after byte-compiling and it runs ok. >>=20 >> ;; However, (native-compile "compile-bug.el") fails with >> ;; the error report: >>=20 >> ;; Compiling file /mnt/chromeos/GoogleDrive/MyDrive/Linux/working/compil= e-bug.el at Fri Feb 16 08:35:04 >> 2024 >> ;; compile-bug.el:12:45: Warning: Unknown defun property =E2=80=98fixnum= =E2=80=99 in foo >> ;; compile-bug.el:12:45: Warning: Unknown defun property =E2=80=98vector= =E2=80=99 in foo > > Where did you see these declare forms documented? I don't see them in > the ELisp Reference manual. I think you copied them from some other > Lisp. In which case Emacs is correct telling you that these declare > forms are unknown. > > Andrea, Stefan: am I right? Hi Eli, yes you are correct, we don't support this (so far at least). Andrea