From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.bugs Subject: bug#6740: Spurious byte compiler warnings Date: Wed, 28 Jul 2010 21:54:04 +0200 Message-ID: References: <20100727200619.GC2280@muc.de> <20100727212328.GD2280@muc.de> <20100728174933.GB2999@muc.de> <20100728194511.GD2999@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1280347687 13129 80.91.229.12 (28 Jul 2010 20:08:07 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 28 Jul 2010 20:08:07 +0000 (UTC) Cc: Dan Nicolaescu , 6740@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 28 22:08:05 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 1OeCuz-0000mV-Us for geb-bug-gnu-emacs@m.gmane.org; Wed, 28 Jul 2010 22:08:04 +0200 Original-Received: from localhost ([127.0.0.1]:38841 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OeCur-00060m-5p for geb-bug-gnu-emacs@m.gmane.org; Wed, 28 Jul 2010 16:07:49 -0400 Original-Received: from [140.186.70.92] (port=40815 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OeCum-00060E-RF for bug-gnu-emacs@gnu.org; Wed, 28 Jul 2010 16:07:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OeCul-0001OU-1S for bug-gnu-emacs@gnu.org; Wed, 28 Jul 2010 16:07:44 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51967) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OeCuk-0001OO-WD for bug-gnu-emacs@gnu.org; Wed, 28 Jul 2010 16:07:43 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OeCiT-0002a4-MI; Wed, 28 Jul 2010 15:55:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juanma Barranquero 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 19:55:01 +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.12803468569907 (code B ref 6740); Wed, 28 Jul 2010 19:55:01 +0000 Original-Received: (at 6740) by debbugs.gnu.org; 28 Jul 2010 19:54:16 +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 1OeChj-0002Zk-DY for submit@debbugs.gnu.org; Wed, 28 Jul 2010 15:54:15 -0400 Original-Received: from mail-bw0-f44.google.com ([209.85.214.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OeChh-0002Zf-K8 for 6740@debbugs.gnu.org; Wed, 28 Jul 2010 15:54:14 -0400 Original-Received: by bwz7 with SMTP id 7so4507779bwz.3 for <6740@debbugs.gnu.org>; Wed, 28 Jul 2010 12:54:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=3Hd+Bs5vcXIT4ostSxt/UfITloAD54NoZhjEzvfzioQ=; b=f5C3rylEj5aYpBHV3gZtDT0J72f4IG2ErZwdNZdMwCLrvhldjBQ8UMAvIIdesOG6hf ofOdrm3QeFxcX0spkPmEG51b6Hgg30pZ/Qk1DlUSzaCxovBpIOhIv5cqgPAvv0g96TeZ eWgMiGyyzy29QX18+l1Lp9ThepxJSyU1g/b8s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=pUgiFOHay6IcLH9d5qz7gKcTwLdGNXKWlWD0M3QF5pecDLP7D0pZJdG0NBl0e2HU/5 P/xMZ81TfVfKiBhk9uM8QzcPIhD5NRMAH079hHJkaiCOZRV/qav3cgYaHOC3bIRCC2t4 Q6q2dsF0F60bAHHJN+SbL9knQ/5H2zdECskFo= Original-Received: by 10.204.73.211 with SMTP id r19mr8044191bkj.131.1280346864209; Wed, 28 Jul 2010 12:54:24 -0700 (PDT) Original-Received: by 10.204.180.136 with HTTP; Wed, 28 Jul 2010 12:54:04 -0700 (PDT) In-Reply-To: <20100728194511.GD2999@muc.de> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Wed, 28 Jul 2010 15:55:01 -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:39032 Archived-At: On Wed, Jul 28, 2010 at 21:45, Alan Mackenzie wrote: > I'm doubting > its adequacy. =C2=A0Without understanding that (featurep 'xemacs) has bee= n > optimised to nil, it's impossible to understand the current message I think the message is a good hint that something is being statically determined to be nil inside an `and'. > (either of them). Yes, that's a bug :-) > If only there were a warning about 'xemacs, it would be plain > and obvious. But, as I've explained, there cannot (easily) be a waning about `xemacs'; it would have to be about any code that statically evaluates to nil in such a context. I'm not sure how clean that would be to implement, and anyway no one has been bothered enough to try it. > Does anybody care about > it enough to want that message in this particular case? Yes. You don't know whether a warning is relevant or not unless you get it. In *this* particular case, all you need to quiet the byte-compiler is @@ -1,5 +1,5 @@ (eval-when-compile - (if (and (not (featurep 'cc-fix)) - (featurep 'xemacs) + (if (and (featurep 'xemacs) + (not (featurep 'cc-fix)) (progn (require 'font-lock) > Couldn't the > optimisation just be done quietly in the background, with no warning? Why? The optimization is detecting something suspicious, and acting accordingly. > Or couldn't there be a warning like > > =C2=A0 =C2=A0"`(featurep 'xemacs)' has been translated to nil" ???? That's worse that what you're complaining now; every use of (featurep 'xemacs) in the sources would produce warnings! =C2=A0 =C2=A0 Juanma