GNU bug report logs -
#411
23.0.60; flet and byte-compilation
Previous Next
Reported by: michael_heerdegen <at> web.de
Date: Sat, 14 Jun 2008 15:25:06 UTC
Severity: wishlist
Fixed in version 24.3
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
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.
This bug report was last modified 12 years and 264 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.