This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/46224] Enhancement: Issue warning when matching placement delete operator is missing
- From: "egallager at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 26 Sep 2017 21:51:16 +0000
- Subject: [Bug c++/46224] Enhancement: Issue warning when matching placement delete operator is missing
- Auto-submitted: auto-generated
- References: <bug-46224-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46224
Eric Gallager <egallager at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |egallager at gcc dot gnu.org
--- Comment #2 from Eric Gallager <egallager at gcc dot gnu.org> ---
I get the following warnings for the 1st testcase:
$ /usr/local/bin/g++ -c -Wall -Wextra -pedantic -Weffc++ -Wplacement-new=2
46224.cc
46224.cc:12:13: warning: dynamic exception specifications are deprecated in
C++11 [-Wdeprecated]
int) throw (std::bad_alloc)
^~~~~
46224.cc: In function ‘int main()’:
46224.cc:32:10: warning: variable ‘f’ set but not used
[-Wunused-but-set-variable]
Foo* f;
^
$
And similarly for the 2nd testcase:
$ /usr/local/bin/g++ -c -Wall -Wextra -pedantic -Weffc++ -Wplacement-new=2
46224_a.cc
46224_a.cc:4:58: warning: dynamic exception specifications are deprecated in
C++11 [-Wdeprecated]
void* operator new( std::size_t num_bytes, const char* ) throw
(std::bad_alloc);
^~~~~
46224_a.cc: In function ‘void f()’:
46224_a.cc:13:10: warning: unused variable ‘p’ [-Wunused-variable]
Foo* p = new(__FILE__) Foo();
^
$
I don't think the -Wdeprecated warnings are really the same as what this bug
requests though? I dunno. Leaving UNCONFIRMED for now.