Subject: Re: bug#7145: elisp-code behaves differently after byte-compilation

From: Andreas Schwab <[email-masked]>
Date: Sat, 02 Oct 2010 10:54:47 +0200

"Markus Sauermann" <[email-masked]> 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, [email-masked]
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."