GNU bug report logs -
#21466
[PATCH] Avoid defining (temporarily) vars and functions
Previous Next
Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>
Date: Sat, 12 Sep 2015 03:41:01 UTC
Severity: normal
Tags: patch, wontfix
Found in version 25.0.50
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #44 received at 21466 <at> debbugs.gnu.org (full text, mbox):
Hello, Lars.
On Sat, Mar 26, 2022 at 17:47:24 +0100, Lars Ingebrigtsen wrote:
> Alan Mackenzie <acm <at> muc.de> writes:
> > These explain the "free variable" warnings for the variables and the
> > "defined multiple times" warnings for the functions.
> > To sort out this bug properly, we really need Lisp functions equivalent
> > to C's extern. (defvar foo) and (declare-function 'foo nil) currently
> > don't fill this need.
> I had a brief look at a couple of the warnings (after the patch), and it
> looks like the warnings could be resolved by just removing the
> cc-bytecomp-deffun (and rearranging the code order).
The whole patch was predicated on:
>>>> It might have made sense back in the days when the
>>>> byte-compiler did not offer built-in ways to silence those
>>>> warnings, but nowadays we can do better.
I'm not convinced that what the byte compiler currently offers is
"better", if that involves having to rearrange things in a source file.
And even then, that would only resolve two of the ~15 warning messages.
By contrast, leaving things alone is not causing any trouble, and seems
unlikely to cause trouble in the near future.
There is currently no clean way of declaring a symbol's variable or
function cell as bound for the byte compiler. Perhaps there should be.
> --
> (domestic pets only, the antidote for overdose, milk.)
> bloggy blog: http://lars.ingebrigtsen.no
--
Alan Mackenzie (Nuremberg, Germany).
This bug report was last modified 3 years and 110 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.