public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c/80528] reimplement gnulib's "useless-if-before-free" script as a compiler warning [not found] <bug-80528-4@http.gcc.gnu.org/bugzilla/> @ 2022-01-08 17:35 ` pinskia at gcc dot gnu.org 2022-05-14 19:13 ` egallager at gcc dot gnu.org ` (3 subsequent siblings) 4 siblings, 0 replies; 5+ messages in thread From: pinskia at gcc dot gnu.org @ 2022-01-08 17:35 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80528 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |enhancement ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/80528] reimplement gnulib's "useless-if-before-free" script as a compiler warning [not found] <bug-80528-4@http.gcc.gnu.org/bugzilla/> 2022-01-08 17:35 ` [Bug c/80528] reimplement gnulib's "useless-if-before-free" script as a compiler warning pinskia at gcc dot gnu.org @ 2022-05-14 19:13 ` egallager at gcc dot gnu.org 2023-03-22 7:26 ` egallager at gcc dot gnu.org ` (2 subsequent siblings) 4 siblings, 0 replies; 5+ messages in thread From: egallager at gcc dot gnu.org @ 2022-05-14 19:13 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80528 Eric Gallager <egallager at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dmalcolm at gcc dot gnu.org --- Comment #5 from Eric Gallager <egallager at gcc dot gnu.org> --- One thing to consider now that GCC has a static analyzer is that putting the kind of useless "if" in question before a "free" can make the analyzer shut up about possible double-free warnings, so if this were to become its own diagnostic, there might be separate diagnostics that prompt users to do opposite things... ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/80528] reimplement gnulib's "useless-if-before-free" script as a compiler warning [not found] <bug-80528-4@http.gcc.gnu.org/bugzilla/> 2022-01-08 17:35 ` [Bug c/80528] reimplement gnulib's "useless-if-before-free" script as a compiler warning pinskia at gcc dot gnu.org 2022-05-14 19:13 ` egallager at gcc dot gnu.org @ 2023-03-22 7:26 ` egallager at gcc dot gnu.org 2024-06-26 9:20 ` egallager at gcc dot gnu.org 2024-06-27 3:40 ` collin.funk1 at gmail dot com 4 siblings, 0 replies; 5+ messages in thread From: egallager at gcc dot gnu.org @ 2023-03-22 7:26 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80528 Eric Gallager <egallager at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rep.dot.nop at gmail dot com --- Comment #6 from Eric Gallager <egallager at gcc dot gnu.org> --- Recent patchset for fixing problems in GCC based on this same principle: https://gcc.gnu.org/pipermail/gcc-patches/2023-March/613116.html ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/80528] reimplement gnulib's "useless-if-before-free" script as a compiler warning [not found] <bug-80528-4@http.gcc.gnu.org/bugzilla/> ` (2 preceding siblings ...) 2023-03-22 7:26 ` egallager at gcc dot gnu.org @ 2024-06-26 9:20 ` egallager at gcc dot gnu.org 2024-06-27 3:40 ` collin.funk1 at gmail dot com 4 siblings, 0 replies; 5+ messages in thread From: egallager at gcc dot gnu.org @ 2024-06-26 9:20 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80528 Eric Gallager <egallager at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |collin.funk1 at gmail dot com --- Comment #7 from Eric Gallager <egallager at gcc dot gnu.org> --- I see Collin Funk has been working on improving the gnulib version; cc-ing: https://lists.gnu.org/archive/html/bug-gnulib/2024-06/msg00193.html ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/80528] reimplement gnulib's "useless-if-before-free" script as a compiler warning [not found] <bug-80528-4@http.gcc.gnu.org/bugzilla/> ` (3 preceding siblings ...) 2024-06-26 9:20 ` egallager at gcc dot gnu.org @ 2024-06-27 3:40 ` collin.funk1 at gmail dot com 4 siblings, 0 replies; 5+ messages in thread From: collin.funk1 at gmail dot com @ 2024-06-27 3:40 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80528 --- Comment #8 from Collin Funk <collin.funk1 at gmail dot com> --- Thanks for the add. My change was just adding nullptr since it can be used in C code (per C23). I agree with most of the other comments. Probably excessive for -Wall and -Wextra since the idiom exists in old code still. But a warning that is explicitly enabled would be nice. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-06-27 3:40 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <bug-80528-4@http.gcc.gnu.org/bugzilla/> 2022-01-08 17:35 ` [Bug c/80528] reimplement gnulib's "useless-if-before-free" script as a compiler warning pinskia at gcc dot gnu.org 2022-05-14 19:13 ` egallager at gcc dot gnu.org 2023-03-22 7:26 ` egallager at gcc dot gnu.org 2024-06-26 9:20 ` egallager at gcc dot gnu.org 2024-06-27 3:40 ` collin.funk1 at gmail dot com
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).