https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89863
Bug ID: 89863 Summary: [meta-bug] Issues that cppcheck finds that gcc misses Product: gcc Version: 9.0 Status: UNCONFIRMED Keywords: diagnostic, meta-bug Severity: normal Priority: P3 Component: other Assignee: unassigned at gcc dot gnu.org Reporter: egallager at gcc dot gnu.org CC: dcb314 at hotmail dot com, ettl.martin at gmx dot de Depends on: 33715, 47170, 49564, 50355, 52124, 53871, 54582, 56370, 58237, 59205, 63854, 64524, 65446, 67729, 70800, 79364, 79950, 81674, 82100, 88057 Target Milestone: --- David Binderman often files bugs he finds with cppcheck, so making a meta-bug to group them all. Some of these checks might also be inspiration for new gcc warnings. (Dave, let me know if I missed any) Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33715 [Bug 33715] Suggest -Wmemleak warning for C++ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47170 [Bug 47170] [cppcheck][PATCH] found resource leaks in gcc/intl/localealias.c https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49564 [Bug 49564] [cppcheck][patch] fixed resource and memory leaks in /gcc/gcc/config/alpha/host-osf.c https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50355 [Bug 50355] Comparison is always true in alpha config code https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52124 [Bug 52124] config/cr16/cr16.c: possibly redundant code https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53871 [Bug 53871] Please warn about endless loops if they are obvious https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54582 [Bug 54582] gap in FORTIFY checking of buffer lengths https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56370 [Bug 56370] RFE: warn on 'foo = realloc(foo, …)' https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58237 [Bug 58237] gcc fails to detect obvious resource leaks https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59205 [Bug 59205] config/iq2000/iq2000.c:2188: possible cut'n'paste error ? https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63854 [Bug 63854] Fix memory leaks seen in JIT https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64524 [Bug 64524] gcc does not warn about same expression in both parts of ternary operator https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65446 [Bug 65446] Improve -Wformat-signedness https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67729 [Bug 67729] -Wformat should warn for %Ns where the buffer size is known to be less than N in size https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70800 [Bug 70800] libgcc/config/libbid/bid_binarydecimal.c: suspicious comparison ? https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79364 [Bug 79364] some variadic functions with an empty struct miscompiled with C++ (at least for x64 targets) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79950 [Bug 79950] G++ cannot detect simple off by one error in STL classes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81674 [Bug 81674] gcc cannot detect missing initialisers for fields in constructors https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82100 [Bug 82100] gcc does not warn about code that is unreachable due to conflicting conditions [subset of reviving -Wunreachable-code] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88057 [Bug 88057] libdecnumber/decCommon.c:479: use of out of scope variable