This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/33715] New: Suggest -Wmemleak warning for C++
- From: "felix-gcc at fefe dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Oct 2007 15:54:01 -0000
- Subject: [Bug c++/33715] New: Suggest -Wmemleak warning for C++
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
I would like to have a warning in C++ that warns about local variables assigned
via operator new or operator new[], but then are not freed in an exception
handling clause in case of an exception.
This would probably be very noisy, but would also be very helpful in getting
your own code exception safe. In a second step I'd like to have an attribute
to denote values that are a "handle", for example a FILE* or an int in open()
and socket(), so that gcc could warn about resource leaks in general.
--
Summary: Suggest -Wmemleak warning for C++
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: felix-gcc at fefe dot de
GCC build triplet: x86_64-pc-linux-gnu
GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33715