[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#6740: Spurious byte compiler warnings
From: |
Dan Nicolaescu |
Subject: |
bug#6740: Spurious byte compiler warnings |
Date: |
Tue, 27 Jul 2010 16:26:03 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) |
Alan Mackenzie <acm@muc.de> writes:
> 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.
The byte compiler knows that (featurep 'xemacs) is false, so
(and (not (featurep 'cc-fix)) ... )
will be false, so the featurep result is indeed unused.
If you use (and (featurep 'xemacs) (not (featurep 'cc-fix) ...
the warning will go away.
- bug#6740: Spurious byte compiler warnings, Alan Mackenzie, 2010/07/27
- bug#6740: Spurious byte compiler warnings,
Dan Nicolaescu <=
- bug#6740: Spurious byte compiler warnings, Alan Mackenzie, 2010/07/27
- bug#6740: Spurious byte compiler warnings, Juanma Barranquero, 2010/07/27
- bug#6740: Spurious byte compiler warnings, Alan Mackenzie, 2010/07/28
- bug#6740: Spurious byte compiler warnings, Juanma Barranquero, 2010/07/28
- bug#6740: Spurious byte compiler warnings, Alan Mackenzie, 2010/07/28
- bug#6740: Spurious byte compiler warnings, Juanma Barranquero, 2010/07/28
- bug#6740: Spurious byte compiler warnings, Dan Nicolaescu, 2010/07/28
- bug#6740: Spurious byte compiler warnings, Alan Mackenzie, 2010/07/29
- bug#6740: Spurious byte compiler warnings, Juanma Barranquero, 2010/07/29
bug#6740: Spurious byte compiler warnings, Stefan Monnier, 2010/07/27