[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#61730: 30.0.50; Compiler warnings for delq and delete
From: |
Eli Zaretskii |
Subject: |
bug#61730: 30.0.50; Compiler warnings for delq and delete |
Date: |
Fri, 24 Feb 2023 15:56:22 +0200 |
> Cc: 61730@debbugs.gnu.org, Stefan Monnier <monnier@iro.umontreal.ca>
> From: Mattias Engdegård <mattias.engdegard@gmail.com>
> Date: Fri, 24 Feb 2023 14:43:34 +0100
>
> Let's experiment: warning about for-effect calls to
>
> mapcar mapcan mapconcat
> delq delete delete-dups delete-consecutive-dups
> cl-delete cl-delete-if cl-delete-if-not cl-delete-duplicates
> sort
>
> results in 34 such calls found on master, most of them about `delq` and
> `delete`, but `delete-dups`, `cl-delete`, `mapconcat` and `sort` are also
> represented.
>
> Some of these are no doubt safe, a few of them knowingly so, but it's
> definitely not obvious from a quick look at the code. It's poor style in any
> case.
>
> Thus such a warning definitely falls on the beneficial side. Let's do it.
I'd hate to see Emacs's byte compiler becoming the Big Brother who
knows better. Richard described a couple of situations where the
"problematic" usage is completely legitimate and safe; please try not
to emit the warning in those cases.
- bug#61730: 30.0.50; Compiler warnings for delq and delete, Michael Heerdegen, 2023/02/23
- bug#61730: 30.0.50; Compiler warnings for delq and delete, Richard Stallman, 2023/02/23
- bug#61730: 30.0.50; Compiler warnings for delq and delete, Mattias Engdegård, 2023/02/24
- bug#61730: 30.0.50; Compiler warnings for delq and delete,
Eli Zaretskii <=
- bug#61730: 30.0.50; Compiler warnings for delq and delete, Michael Heerdegen, 2023/02/24
- bug#61730: 30.0.50; Compiler warnings for delq and delete, Eli Zaretskii, 2023/02/24
- bug#61730: 30.0.50; Compiler warnings for delq and delete, Michael Heerdegen, 2023/02/24
- bug#61730: 30.0.50; Compiler warnings for delq and delete, Eli Zaretskii, 2023/02/24
- bug#61730: 30.0.50; Compiler warnings for delq and delete, Michael Heerdegen, 2023/02/24
- bug#61730: 30.0.50; Compiler warnings for delq and delete, Michael Heerdegen, 2023/02/24
- bug#61730: 30.0.50; Compiler warnings for delq and delete, Mattias Engdegård, 2023/02/24
- bug#61730: 30.0.50; Compiler warnings for delq and delete, Stefan Monnier, 2023/02/24
- bug#61730: 30.0.50; Compiler warnings for delq and delete, Mattias Engdegård, 2023/02/25
- bug#61730: 30.0.50; Compiler warnings for delq and delete, Richard Stallman, 2023/02/24