GNU bug report logs - #47391
27.2; static list return from function and nconc

Previous Next

Package: emacs;

Reported by: Rajeev Narang <rajeev.jnk <at> sivalik.com>

Date: Thu, 25 Mar 2021 15:21:03 UTC

Severity: normal

Tags: fixed

Found in version 27.2

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Philipp Stephani <p.stephani2 <at> gmail.com>
To: Rajeev Narang <rajeev.jnk <at> sivalik.com>
Cc: 47391 <at> debbugs.gnu.org, Emacs developers <emacs-devel <at> gnu.org>
Subject: bug#47391: 27.2; static list return from function and nconc
Date: Thu, 25 Mar 2021 16:28:26 +0100
Am Do., 25. März 2021 um 16:23 Uhr schrieb Rajeev Narang via Bug
reports for GNU Emacs, the Swiss army knife of text editors
<bug-gnu-emacs <at> gnu.org>:
>
> (defun fn () '(1 2))
>
> (nconc (fn) '(3))
> -> (1 2 3)

This is undefined behavior/unsupported. The value that (fn) evaluates
to is immutable, but nconc mutates it.

>
> (nconc (fn) '(3))
> -> (1 2 3 3) ? should be (1 2 3)
>
> If this is not a bug, then hfy-invisible, hfy-face-to-style-i may need to be fixed.

If they use this pattern, then they should indeed be fixed.




This bug report was last modified 4 years and 53 days ago.

Previous Next


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