* Review request: Fixing of spurious byte compiler warnings "might not be defined at runtime".
@ 2015-11-21 20:30 Alan Mackenzie
2015-11-22 12:54 ` Artur Malabarba
0 siblings, 1 reply; 2+ messages in thread
From: Alan Mackenzie @ 2015-11-21 20:30 UTC (permalink / raw)
To: emacs-devel
Hello, Emacs.
I've just created a branch fix/not-defined-at-runtime and committed a
fix into it. This is a fix for bug #21963, and more.
The bug was the spurious generation by the byte compiler of warnings
like "function `foo' might not be defined at run time".
There were several problems here:
(i) The main one was, when defining new functions in an
`eval-when-compile' all these functions were blacklisted as "not at
runtime", even when they were subsequently defined in runtime scope.
(ii) In an `eval-when-compile', the byte compiler first compiles, then
evals the body. It fails to isolate the main compilation from this
subsidiary compilation, leading to ".. not be defined at run time".
(iii) In interactive byte-compile-files, the variable
byte-compile-noruntime-functions was not being initialised between
runs, so that "blacklisted" functions accumulated in it.
The solution to (i) is to maintain a list of functions defined in
runtime scope, and when emitting warnings, to check the dodgy function
is not on the list before emitting a warning about it.
The solution to (ii) is to bind certain status variables to themselves
around the subsidiary compilation.
Some intractible warnings now no longer occur while building CC Mode,
for example. Also, `format-spec' in org.el is no longer complained of.
It Would Be Nice If people could try out or review this new code.
--
Alan Mackenzie (Nuremberg, Germany).
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-11-22 12:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-21 20:30 Review request: Fixing of spurious byte compiler warnings "might not be defined at runtime" Alan Mackenzie
2015-11-22 12:54 ` Artur Malabarba
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).