From: Alan Mackenzie <acm@muc.de>
To: Juanma Barranquero <lekktu@gmail.com>
Cc: Dan Nicolaescu <dann@gnu.org>, 6740@debbugs.gnu.org
Subject: bug#6740: Spurious byte compiler warnings
Date: Wed, 28 Jul 2010 17:49:33 +0000 [thread overview]
Message-ID: <20100728174933.GB2999@muc.de> (raw)
In-Reply-To: <AANLkTikdVKf70_nbaBbYPyjUE7iRZ1RXX8ybFJEvaXQe@mail.gmail.com>
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 <acm@muc.de> 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).
next prev parent reply other threads:[~2010-07-28 17:49 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-27 20:06 bug#6740: Spurious byte compiler warnings Alan Mackenzie
2010-07-27 20:26 ` Dan Nicolaescu
2010-07-27 21:23 ` Alan Mackenzie
2010-07-27 22:57 ` Juanma Barranquero
2010-07-28 17:49 ` Alan Mackenzie [this message]
2010-07-28 17:56 ` Juanma Barranquero
2010-07-28 19:45 ` Alan Mackenzie
2010-07-28 19:54 ` Juanma Barranquero
2010-07-28 23:00 ` Dan Nicolaescu
2010-07-29 20:24 ` Alan Mackenzie
2010-07-29 20:36 ` Juanma Barranquero
2010-07-27 21:40 ` Stefan Monnier
2020-11-19 4:25 ` Stefan Kangas
2020-11-24 6:40 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100728174933.GB2999@muc.de \
--to=acm@muc.de \
--cc=6740@debbugs.gnu.org \
--cc=dann@gnu.org \
--cc=lekktu@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.