GNU bug report logs - #30635
No compiler warning if code forgets to require cl-lib

Previous Next

Package: emacs;

Reported by: Glenn Morris <rgm <at> gnu.org>

Date: Tue, 27 Feb 2018 18:47:02 UTC

Severity: normal

Found in version 26.0.91

Fixed in version 27.1

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Glenn Morris <rgm <at> gnu.org>
To: 30635 <at> debbugs.gnu.org
Subject: bug#30635: No compiler warning if code forgets to require cl-lib
Date: Tue, 27 Feb 2018 13:45:57 -0500
Package: emacs
Version: 26.0.91

There's no compiler warning if a library uses cl-lib without requiring it.
I assume this is because bytecomp.el requires cl-lib.
Perhaps bytecomp can track cl-lib specially to work around this.

(I was wondering how the problem shown in 6288c3d went unspotted.)

Example:

foo.el:
(defun foo ()
  (cl-member-if 'cl-evenp '(1 2 3)))

emacs -Q -batch -f batch-byte-compile foo.el
  -> silently succeeds

emacs -Q -l foo.elc
M-: (foo)
 -> void-function cl-member-if




This bug report was last modified 7 years and 56 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.