From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#69249: bug in native-compile? Date: Sun, 18 Feb 2024 21:44:14 +0200 Message-ID: <86h6i5r20h.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33081"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 69249@debbugs.gnu.org, rms@gnu.org To: Robert Boyer , Andrea Corallo , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 18 20:44:55 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 1rbn5q-0008Mk-Cr for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 18 Feb 2024 20:44:54 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rbn5i-0007Y6-H5; Sun, 18 Feb 2024 14:44:46 -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 1rbn5e-0007Xf-KP for bug-gnu-emacs@gnu.org; Sun, 18 Feb 2024 14:44:43 -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 1rbn5e-0000nJ-5R for bug-gnu-emacs@gnu.org; Sun, 18 Feb 2024 14:44:42 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rbn5y-0003NY-OR for bug-gnu-emacs@gnu.org; Sun, 18 Feb 2024 14:45:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Feb 2024 19:45:02 +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.170828550212976 (code B ref 69249); Sun, 18 Feb 2024 19:45:02 +0000 Original-Received: (at 69249) by debbugs.gnu.org; 18 Feb 2024 19:45:02 +0000 Original-Received: from localhost ([127.0.0.1]:38373 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rbn5x-0003N4-G3 for submit@debbugs.gnu.org; Sun, 18 Feb 2024 14:45:01 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:34456) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rbn5v-0003Ms-Ih for 69249@debbugs.gnu.org; Sun, 18 Feb 2024 14:45:00 -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 1rbn5V-0000k1-5V; Sun, 18 Feb 2024 14:44:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=6ylm49TQJEq/OJU6EVkHufFYKHSoIUtLuV1N2OTUcB0=; b=lit2cw+rXI+TLO9lvS8z MvCMClbDTVYCLHKpLS8+RbToJccJq9OIuu5gpDHPr1XQHVZ4ed0XiOxRjilbstefbijyMQAYCf86O qd2+fY3xliBxo3xjHbn1qFwsWXqXCkM1inguAi+6S9TqXV7QPvzTH0qny4N5nsp3EvQzcJjVBMk3v lNrvDLgkIngzZ9hVsMt/fV6CgvfCL+w20o+EO7Nu75tgEc+JV7q0tG+sg0AXivyvHWqwm5QVJt/i2 PLgm0a348EGX12M7o9+nh6EZlzdVkoQgI1/j+wfhrifBTdvVJHZEtgmYX7MkiDw29hQQa2ThLB3Te Bv1F4FkGVqSTaQ==; In-Reply-To: (message from Robert Boyer on Sat, 17 Feb 2024 22:26:27 -0600) 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:280207 Archived-At: > Cc: rms@gnu.org > From: Robert Boyer > Date: Sat, 17 Feb 2024 22:26:27 -0600 > > Here is a report on what seems to me to be a bug in native-compile. > > ---------------------------------------------------------------------- > > ;; Let us suppose that this is the file "compile-bug.el" > > ;; Invoking (native-compile "compile-bug.el") should work, I do believe. > ;; However it fails and the error message is printed below. > > ;; It cannot be emphasized enough how serious this problem seems to me, Bob > ;; Boyer, robertstephenboyer@gmail.com. > > ;; The reason it is so SERIOUS is that ANY Lisp compiler would need to be > ;; delighted to see such a typing expression as > > ;; (declare (fixnum start end) (vector input scratch)) > > ;; Why? BECAUSE it means that the compiler does not have to lay down code to > ;; type check the type of start, end, input, and scratch!!!! > > ;; However, (native-compile "compile-bug.el") results in the following error message: > > ;; Compiling file /mnt/chromeos/GoogleDrive/MyDrive/Linux/working/compile-bug.el at Fri Feb 16 08:25:19 > 2024 > ;; compile-bug.el:2:45: Warning: Unknown defun property ‘fixnum’ in foo > ;; compile-bug.el:2:45: Warning: Unknown defun property ‘vector’ in foo > > (defun foo (start end input scratch) > (declare (fixnum start end) (vector input scratch)) > (list start end input scratch)) > > ;; foo works fine > > ;; Here is an example form for the invocation of foo: > > ;; (foo 1 2 (make-vector 3 4) (make-vector 5 6)) > > ;; That form runs ok if it is running with foo interpreted. > > ;; (byte-compile 'foo) runs ok. > > ;; One can run the same form after byte-compiling and it runs ok. > > ;; However, (native-compile "compile-bug.el") fails with > ;; the error report: > > ;; Compiling file /mnt/chromeos/GoogleDrive/MyDrive/Linux/working/compile-bug.el at Fri Feb 16 08:35:04 > 2024 > ;; compile-bug.el:12:45: Warning: Unknown defun property ‘fixnum’ in foo > ;; compile-bug.el:12:45: Warning: Unknown defun property ‘vector’ 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?