Subject: Re: bug#69249: bug in native-compile?

From: Stefan Monnier <[email-masked]>
Date: Sun, 18 Feb 2024 18:32:30 -0500

> ;; 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

First thing: these are not error messages!  They're *warnings*!

`batch-byte-compile` also gives those warnings, because ELisp does not
know those declarations.  The native compiler does support some type
annotations, but they do not take this shape.

I presume you took those from some other Lisp dialect, but that won't do
you much good.  Scheme is not Clojure is not Common Lisp is not ELisp ...

BTW, A more recent Emacs would give you an additional warning:

    Warning: file has no ‘lexical-binding’ directive on its first line

So, I see no bug.  Did the resulting native-compile misbehave in
any way?  I presume you're worried about its performance.
If so, do you have concrete code where you measured the performance and
were disappointed and where you have good reasons to believe that type
annotations would make a difference?  If so, we'd be interested to see
your code to try and improve our compiler.

        Stefan