[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Review request: Fixing of spurious byte compiler warnings "might not be
Review request: Fixing of spurious byte compiler warnings "might not be defined at runtime".
Sat, 21 Nov 2015 20:30:16 +0000
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).
- Review request: Fixing of spurious byte compiler warnings "might not be defined at runtime".,
Alan Mackenzie <=