bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#61730: 30.0.50; Compiler warnings for delq and delete


From: Michael Heerdegen
Subject: bug#61730: 30.0.50; Compiler warnings for delq and delete
Date: Thu, 23 Feb 2023 11:29:25 +0100

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.







reply via email to

[Prev in Thread] Current Thread [Next in Thread]