From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.bugs Subject: bug#6740: Spurious byte compiler warnings Date: Tue, 27 Jul 2010 16:26:03 -0400 Message-ID: References: <20100727200619.GC2280@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1280263081 11107 80.91.229.12 (27 Jul 2010 20:38:01 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 27 Jul 2010 20:38:01 +0000 (UTC) Cc: 6740@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 27 22:38:00 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OdquU-00008m-WC for geb-bug-gnu-emacs@m.gmane.org; Tue, 27 Jul 2010 22:37:59 +0200 Original-Received: from localhost ([127.0.0.1]:49829 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OdquU-0006gB-9s for geb-bug-gnu-emacs@m.gmane.org; Tue, 27 Jul 2010 16:37:58 -0400 Original-Received: from [140.186.70.92] (port=54907 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OdquM-0006db-75 for bug-gnu-emacs@gnu.org; Tue, 27 Jul 2010 16:37:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OdquJ-0007nU-VV for bug-gnu-emacs@gnu.org; Tue, 27 Jul 2010 16:37:50 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54524) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OdquJ-0007nQ-Rs for bug-gnu-emacs@gnu.org; Tue, 27 Jul 2010 16:37:47 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Odqiw-0000aa-6N; Tue, 27 Jul 2010 16:26:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dan Nicolaescu Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 27 Jul 2010 20:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6740 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6740-submit@debbugs.gnu.org id=B6740.12802623572258 (code B ref 6740); Tue, 27 Jul 2010 20:26:02 +0000 Original-Received: (at 6740) by debbugs.gnu.org; 27 Jul 2010 20:25:57 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Odqir-0000aN-88 for submit@debbugs.gnu.org; Tue, 27 Jul 2010 16:25:57 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Odqip-0000aI-4s for 6740@debbugs.gnu.org; Tue, 27 Jul 2010 16:25:55 -0400 Original-Received: from dann by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1Odqix-0004hF-7W; Tue, 27 Jul 2010 16:26:03 -0400 In-Reply-To: <20100727200619.GC2280@muc.de> (Alan Mackenzie's message of "Tue\, 27 Jul 2010 20\:06\:19 +0000") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 27 Jul 2010 16:26:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:38994 Archived-At: Alan Mackenzie 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.