all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Philipp Stephani <p.stephani2@gmail.com>
To: Rajeev Narang <rajeev.jnk@sivalik.com>
Cc: 47391@debbugs.gnu.org, Emacs developers <emacs-devel@gnu.org>
Subject: bug#47391: 27.2; static list return from function and nconc
Date: Thu, 25 Mar 2021 16:28:26 +0100	[thread overview]
Message-ID: <CAArVCkRmjEXQdhCod0mhOa0MRqM=quqcbESOCJHpbz2jnoyoLg__182.142194692858$1616686203$gmane$org@mail.gmail.com> (raw)
In-Reply-To: <87r1k32sir.fsf@hm.sivalik.com>

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





  parent reply	other threads:[~2021-03-25 15:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-25 14:54 bug#47391: 27.2; static list return from function and nconc Rajeev Narang via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-03-25 15:28 ` Philipp Stephani
2021-03-25 15:43   ` Stefan Monnier
2021-03-25 15:43   ` Stefan Monnier
2021-03-25 15:28 ` Philipp Stephani [this message]
2021-03-25 15:55 ` Gregory Heytings
2021-03-25 15:58   ` Stefan Monnier
2021-03-25 16:03     ` Gregory Heytings
2021-03-25 16:03     ` Gregory Heytings
2021-03-28 13:21     ` Lars Ingebrigtsen
2021-03-25 15:55 ` Gregory Heytings

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAArVCkRmjEXQdhCod0mhOa0MRqM=quqcbESOCJHpbz2jnoyoLg__182.142194692858$1616686203$gmane$org@mail.gmail.com' \
    --to=p.stephani2@gmail.com \
    --cc=47391@debbugs.gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=rajeev.jnk@sivalik.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.