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: Eli Zaretskii
Subject: bug#61730: 30.0.50; Compiler warnings for delq and delete
Date: Fri, 24 Feb 2023 17:29:23 +0200

> From: Michael Heerdegen <michael_heerdegen@web.de>
> Cc: Mattias Engdegård <mattias.engdegard@gmail.com>,
>   61730@debbugs.gnu.org,
>   monnier@iro.umontreal.ca
> Date: Fri, 24 Feb 2023 16:11:51 +0100
> 
> But yes, we would warn about some legitimate and safe calls.  The
> advantages outweigh the disadvantages in my opinion.

Not in my opinion.  I'm sick and tired from seeing compilers emitting
bogus warnings which require one to spend time verifying perfectly
correct code, or, worse, modify the code to shut up the compiler.  Do
we really want to see stuff like

  (setq _ (delq ...))

in our code?

> > please try not to emit the warning in those cases.
> 
> I think this is impossible.  The compiler can't know or prove whether
> the element to delete is different from the first one.

If it's really impossible (and I'm not sure it is), then the better
course of action is to emit the warnings only if the byte compiler was
requested to be more sensitive to potential issues, similar to GCC's
"-W*" options.  IOW, if someone wants to lint their code, let them ask
for a linting compilation.





reply via email to

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