all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#61730: 30.0.50; Compiler warnings for delq and delete
@ 2023-02-23 10:29 Michael Heerdegen
  2023-02-24  3:59 ` Richard Stallman
                   ` (2 more replies)
  0 siblings, 3 replies; 38+ messages in thread
From: Michael Heerdegen @ 2023-02-23 10:29 UTC (permalink / raw)
  To: 61730


Hello,

I think we should add compiler warnings for `delete' and `delq' function
calls whose return values are unused.  Those are most likely unintended:
still some programmers don't know that the return value must be assigned
back because the destructive operation on the original list structure
does not necessarily lead to the return value.  It's a pitfall and can
lead to bugs that are hard to debug, so having warnings would be an
improvement.

I think the warnings could be added in a similar way as the "mapcar
called for effect" warnings work.

Adding the same kind of warning for `remq' and `remove' would probably
also be useful.  This will probably not occur that often but it still
would be useful I think.

TIA,

Michael.







^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2023-06-01  0:48 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-23 10:29 bug#61730: 30.0.50; Compiler warnings for delq and delete Michael Heerdegen
2023-02-24  3:59 ` Richard Stallman
2023-02-24 13:43 ` Mattias Engdegård
2023-02-24 13:56   ` Eli Zaretskii
2023-02-24 15:11     ` Michael Heerdegen
2023-02-24 15:29       ` Eli Zaretskii
2023-02-24 15:45         ` Michael Heerdegen
2023-02-24 15:48           ` Eli Zaretskii
2023-02-24 16:17             ` Michael Heerdegen
2023-02-24 16:45               ` Michael Heerdegen
2023-02-24 19:33                 ` Mattias Engdegård
2023-02-24 20:20                   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-25  9:40                     ` Mattias Engdegård
2023-02-25  4:15       ` Richard Stallman
2023-02-25  8:11         ` Eli Zaretskii
2023-02-25 12:34           ` Michael Heerdegen
2023-02-25 13:25             ` Eli Zaretskii
2023-02-25 15:09               ` Michael Heerdegen
2023-02-25 15:29                 ` Michael Heerdegen
2023-02-25 15:48                 ` Eli Zaretskii
2023-02-27  3:22                   ` Richard Stallman
2023-02-27 10:37                     ` Michael Heerdegen
2023-02-27 11:37                     ` Eli Zaretskii
2023-02-27  3:24           ` Richard Stallman
2023-02-27 11:44             ` Eli Zaretskii
2023-02-24 15:52   ` Mattias Engdegård
2023-02-24 16:37     ` Michael Heerdegen
2023-04-09 16:41 ` Mattias Engdegård
2023-05-01 16:06   ` Mattias Engdegård
2023-05-20  1:57     ` Michael Heerdegen
2023-05-20  9:14       ` Mattias Engdegård
2023-05-21  0:56         ` Michael Heerdegen
2023-05-21  3:01           ` Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-21  3:57             ` Michael Heerdegen
2023-05-21  5:55               ` Eli Zaretskii
2023-05-21  8:42               ` Mattias Engdegård
2023-05-31 14:38         ` Mattias Engdegård
2023-06-01  0:48           ` Michael Heerdegen

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.