Subject: Re: bug#73881: 31.0.50; Unexpected warnings about recursive occurrences of obsolete functions

From: Stefan Kangas <[email-masked]>
Date: Mon, 28 Oct 2024 15:32:52 -0700

Stefan Monnier <[email-masked]> writes:

> I propose the patch below (which also fixes a leak of
> `byte-compile-global-not-obsolete-vars` to code compiled from other
> files).
> But I don't think it fixes the OP's problem because
>
>     (macroexpand '(defun my-foo () (declare (obsolete "blabla" "25")) 42))
> =>
>     (prog1 (defalias 'my-foo #'(lambda nil ...))
>       (make-obsolete 'my-foo '"blabla" "25"))
>
> IOW, the `make-obsolete` comes *after* the function and thus my new code
> will only silence warnings for calls to `my-foo` that are present
> *after* the function definition.

It looks like a step in the right direction to me.