public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug analyzer/99667] New: RFE: complain about uninitialized member variables in constructor
@ 2021-03-19 13:21 dmalcolm at gcc dot gnu.org
2022-06-13 13:58 ` [Bug analyzer/99667] " dmalcolm at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2021-03-19 13:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99667
Bug ID: 99667
Summary: RFE: complain about uninitialized member variables in
constructor
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: analyzer
Assignee: dmalcolm at gcc dot gnu.org
Reporter: dmalcolm at gcc dot gnu.org
Blocks: 97110
Target Milestone: ---
The analyzer could warn about C++ constructors that don't fully initialize all
member variables.
See e.g. bug 99617 (found by cppcheck).
Related (but perhaps different) are *usages* of member variables in a
constructor before initialization; see e.g. bug 19808 (though this should
probably be a different RFE, as it's more difficult)
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97110
[Bug 97110] [meta-bug] tracker bug for supporting C++ in -fanalyzer
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug analyzer/99667] RFE: complain about uninitialized member variables in constructor
2021-03-19 13:21 [Bug analyzer/99667] New: RFE: complain about uninitialized member variables in constructor dmalcolm at gcc dot gnu.org
@ 2022-06-13 13:58 ` dmalcolm at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2022-06-13 13:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99667
David Malcolm <dmalcolm at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Blocks| |105887
--- Comment #1 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Clang's analyzer does something like this:
https://clang.llvm.org/docs/analyzer/checkers.html#optin-cplusplus-uninitializedobject-c
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105887
[Bug 105887] [meta-bug] clang analyzer warnings that GCC's -fanalyzer could
implement
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-06-13 13:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-19 13:21 [Bug analyzer/99667] New: RFE: complain about uninitialized member variables in constructor dmalcolm at gcc dot gnu.org
2022-06-13 13:58 ` [Bug analyzer/99667] " dmalcolm at gcc dot gnu.org
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).