From: Glenn Morris <rgm@gnu.org>
To: 411@emacsbugs.donarmstrong.com
Subject: bug#411: 23.0.60; flet and byte-compilation
Date: Mon, 15 Sep 2008 04:04:58 -0400 [thread overview]
Message-ID: <kny71tq1g5.fsf@fencepost.gnu.org> (raw)
Michael Heerdegen wrote:
> (defun f (x y)
> (flet ((+ (a b) (- a b)))
> (+ x y)))
>
> Bytecompile it [...]
>
> Evaluate the expression (f 1 2). This should yield -1, but the result
> will be 3.
Some (much delayed) observations:
1) it works to use `labels' instead of `flet'
2) it works to comment out the line in bytecomp.el
(byte-defop-compiler (+ byte-plus) byte-compile-associative)
I guess byte-compile-associative mangles the '(+ x y) form without
regard for the redefinition in effect. I don't know if that is
fixable, or should be a documented caveat with regards to primitives.
next reply other threads:[~2008-09-15 8:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-15 8:04 Glenn Morris [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-09-25 2:16 bug#411: 23.0.60; flet and byte-compilation Chong Yidong
2008-09-25 17:45 ` Richard M. Stallman
2008-09-26 18:48 ` Glenn Morris
2008-10-20 1:05 ` Glenn Morris
2008-10-23 2:41 ` Glenn Morris
2012-10-31 3:56 ` Glenn Morris
2012-10-31 13:58 ` Stefan Monnier
2012-10-31 15:01 ` Drew Adams
2012-10-31 16:06 ` Stefan Monnier
2012-10-31 16:13 ` Drew Adams
2008-06-14 15:17 Michael Heerdegen
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=kny71tq1g5.fsf@fencepost.gnu.org \
--to=rgm@gnu.org \
--cc=411@emacsbugs.donarmstrong.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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).