Subject: bug#6740: Spurious byte compiler warnings

From: Alan Mackenzie <[email-masked]>
Date: Tue, 27 Jul 2010 20:06:19 +0000

Hi, Emacs!

(i) Start Emacs, even a most recent bzr version, with -Q.
(ii) Put the following into the *scratch* buffer:

    (eval-when-compile
      (if (and (not (featurep 'cc-fix))
               (featurep 'xemacs)
               (progn
                 (require 'font-lock)
                 (let (font-lock-keywords)
                   (font-lock-compile-keywords '("\\<\\>"))
                   font-lock-keywords)))
          (cc-load "cc-fix")))

  (This fragment is at the top level, and taken from cc-defs.el.).
(iii) do M-x compile-defun on this form.

The byte compiler then issues the following two identical error
messages:

    Warning: value returned from (featurep (quote cc-fix)) is unused
    Warning: value returned from (featurep (quote cc-fix)) is unused

It is obvious that that value is indeed used.  This is a bug.

-- 
Alan Mackenzie (Nuremberg, Germany).