GNU bug report logs - #7145
elisp-code behaves differently after byte-compilation

Previous Next

Package: emacs;

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

From: Johan Bockgård <bojohan <at> gnu.org>
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: Markus Sauermann <mhoram <at> gmx.de>, 7145 <at> debbugs.gnu.org
Subject: bug#7145: elisp-code behaves differently after byte-compilation
Date: Sat, 02 Oct 2010 12:41:18 +0200
Andreas Schwab <schwab <at> linux-m68k.org> writes:

> "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.

But this is, IMO:

(progn
  (defsubst spooky-action-at-a-distance ()
    (let ((a (concat "a" "bc")))
      (store-substring a 0 "123")))

  (defun foo ()
    (spooky-action-at-a-distance)
    (concat "ab" "c"))

  (byte-compile 'foo)
  (foo))

=>  "123"




This bug report was last modified 13 years and 315 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.