GNU bug report logs -
#61730
30.0.50; Compiler warnings for delq and delete
Previous Next
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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.
This bug report was last modified 1 year and 286 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.