From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#6740: Spurious byte compiler warnings Date: Wed, 28 Jul 2010 17:49:33 +0000 Message-ID: <20100728174933.GB2999@muc.de> References: <20100727200619.GC2280@muc.de> <20100727212328.GD2280@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1280340480 19522 80.91.229.12 (28 Jul 2010 18:08:00 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 28 Jul 2010 18:08:00 +0000 (UTC) Cc: Dan Nicolaescu , 6740@debbugs.gnu.org To: Juanma Barranquero Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 28 20:07:58 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 1OeB2q-00065o-FH for geb-bug-gnu-emacs@m.gmane.org; Wed, 28 Jul 2010 20:07:56 +0200 Original-Received: from localhost ([127.0.0.1]:47614 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OeB2p-000273-U9 for geb-bug-gnu-emacs@m.gmane.org; Wed, 28 Jul 2010 14:07:55 -0400 Original-Received: from [140.186.70.92] (port=58978 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OeB2f-00026B-QK for bug-gnu-emacs@gnu.org; Wed, 28 Jul 2010 14:07:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OeB2e-0005V1-Gv for bug-gnu-emacs@gnu.org; Wed, 28 Jul 2010 14:07:45 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57359) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OeB2e-0005Ux-Fa for bug-gnu-emacs@gnu.org; Wed, 28 Jul 2010 14:07:44 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OeAas-0001e6-63; Wed, 28 Jul 2010 13:39:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 28 Jul 2010 17:39: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.12803386986317 (code B ref 6740); Wed, 28 Jul 2010 17:39:02 +0000 Original-Received: (at 6740) by debbugs.gnu.org; 28 Jul 2010 17:38:18 +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 1OeAaA-0001dq-4f for submit@debbugs.gnu.org; Wed, 28 Jul 2010 13:38:18 -0400 Original-Received: from colin.muc.de ([193.149.48.1] helo=mail.muc.de) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OeAa7-0001dk-GY for 6740@debbugs.gnu.org; Wed, 28 Jul 2010 13:38:16 -0400 Original-Received: (qmail 15504 invoked by uid 3782); 28 Jul 2010 17:38:25 -0000 Original-Received: from acm.muc.de (pD9E527D0.dip.t-dialin.net [217.229.39.208]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Wed, 28 Jul 2010 19:38:23 +0200 Original-Received: (qmail 3406 invoked by uid 1000); 28 Jul 2010 17:49:33 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Wed, 28 Jul 2010 13:39: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:39029 Archived-At: Hi, Juanma, On Wed, Jul 28, 2010 at 12:57:04AM +0200, Juanma Barranquero wrote: > On Tue, Jul 27, 2010 at 23:23, Alan Mackenzie wrote: > > It's a bug that the error message is repeated, at the very least. > Yes, likely. > > And the message is most assuredly false because (featurep 'cc-fix) > > isn't always false - for example when it's run under XEmacs. > Not, in code byte-compiled for Emacs it is always false because > (featurep 'xemacs) is false. That means that optimized bytecode is not > portable to XEmacs. But I don't think it was before (for a long time). Optimised .elc isn't even compatible with earlier versions of Emacs. But this discussion is most emphatically NOT about compiled code. It's about the process of compiling sources. > > At the very least, emitting such arcane warnings is unhelpful.  Are > > there any circumstances in which such a warning might help a hacker > > improve his code?  Surely we aren't in the business of making it > > difficult to adapt code for XEmacs? > You make it appear as it if were an attempt to warn about using > XEmacs-specific code, but it is not, as Dan has pointed out. What use is this warning message? How could it prompt a hacker to improve his code? (That's a genuine question, not a rhetorical one.) > The warning is generic, the result of > (and X (featurep 'xemacs) Y Z...) => (prog (and X) nil) => (prog X > nil) ; IIUC the comments in byte-opt.el... Thanks for this explanation. What do you mean by "generic" here? Is the same trick performed on symbols other than 'xemacs? Surely it is a bug that "(featurep 'cc-fix)" appears in the message rather than "(featurep 'xemacs)". This situation is not about 'cc-fix, it's about 'xemacs. I would suggest that if I, a highly experienced Emacs hacker, remain baffled by this message over many months, so will lots of others. Does anybody actually care about "(featurep 'xemacs)" being optimised away? Again, who does this warning message help (other than the hackers who wrote the optimisation code in the first place, of course)? > from whence, "value returned from X is unused". > > I think it's clear, the only code containing (featurep 'xemacs) is > > portable code. > The code is portable. The .elc is not. Er, we're in strong agreement with this. >     Juanma -- Alan Mackenzie (Nuremberg, Germany).