GNU bug report logs -
#7145
elisp-code behaves differently after byte-compilation
Previous Next
Reported by: "Markus Sauermann" <mhoram <at> gmx.de>
Date: Sat, 2 Oct 2010 01:57:01 UTC
Severity: minor
Tags: wontfix
Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
"Markus Sauermann" <mhoram <at> gmx.de> writes:
> The following code however shows a case where this is not the case.
>
> --- BEGIN CODE ---
> (let ((fun (lambda () (let ((bar "foo")
> (baz "foo"))
> (eq bar baz)))))
> (list (funcall (byte-compile fun))
> (funcall fun)))
> --- END CODE---
>
> Evaluation this code (don't try to byte-compile it, because it is buggy ;-) ) results in:
>
> --- BEGIN OUTPUT ---
> (t nil)
> --- END OUTPUT ---
This is not a bug. You cannot depend on the uniqueness of literal
strings. If you want to compare strings you should use equal.
Andreas.
--
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
This bug report was last modified 14 years and 5 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.