unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#21963: Spurious byte compile message: "Warning: the function `bar' might not be defined at runtime."
@ 2015-11-20 10:44 Alan Mackenzie
  2015-11-20 11:19 ` Eli Zaretskii
  2019-09-29 21:24 ` Stefan Kangas
  0 siblings, 2 replies; 13+ messages in thread
From: Alan Mackenzie @ 2015-11-20 10:44 UTC (permalink / raw)
  To: 21963

Hello Emacs.

Using the latest from the emacs-25 branch:

This bug is a variant of bug #11918, which hasn't yet been resolved.

1. Create two Emacs Lisp source files, ~/warnings-bar.el and
~/warnings-foo.el with the following contents:

;;;;;;;; warnings-bar.el ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun bar ()
  "Doc string"
  "bar")

(provide 'warning-bar)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


;;;;;;;; warnings-foo.el ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(eval-when-compile (require 'warning-bar))
(require 'warning-bar)

(defun foo ()
  (bar))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;



2. (Optional) byte compile warnings-bar.el.
3. Byte compile warnings-foo.el with:
    emacs -Q -batch -L ~ -f batch-byte-compile warning-foo.el

.  This produces the spurious warning message:

    warning-foo.el:6:1:Warning: the function `bar' might not be defined
    at runtime.

.

N.B. if the `eval-when-compile' form is removed from warnings-foo.el, the
warning is not produced.

-- 
Alan Mackenzie (Nuremberg, Germany).





^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2019-09-30 21:24 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-20 10:44 bug#21963: Spurious byte compile message: "Warning: the function `bar' might not be defined at runtime." Alan Mackenzie
2015-11-20 11:19 ` Eli Zaretskii
2015-11-20 11:40   ` Alan Mackenzie
2015-11-20 14:48     ` Eli Zaretskii
2015-11-20 15:26       ` Alan Mackenzie
2015-11-20 15:48         ` Eli Zaretskii
2015-11-20 16:01           ` John Wiegley
2015-11-20 16:15             ` Alan Mackenzie
2015-11-20 16:44               ` John Wiegley
2015-11-20 17:50                 ` Alan Mackenzie
2019-09-29 21:24 ` Stefan Kangas
2019-09-30 18:22   ` Alan Mackenzie
2019-09-30 21:24     ` Stefan Kangas

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).