PR c++/71306 - bogus -Wplacement-new with an array element
authorMartin Sebor <msebor@redhat.com>
Mon, 30 May 2016 22:56:43 +0000 (22:56 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Mon, 30 May 2016 22:56:43 +0000 (16:56 -0600)
commit265149a6ae5ca6548da1a6b0c9cc90a2174d36f3
tree11899376f198d04d5907a2b09279954417a5e1f2
parent00631022d83c44777b37f168831eb64142737cbe
PR c++/71306 - bogus -Wplacement-new with an array element

gcc/cp/ChangeLog:
2016-05-27  Martin Sebor  <msebor@redhat.com>

PR c++/71306
* init.c (warn_placement_new_too_small): Handle placement new arguments
that are elements of arrays more carefully.  Remove a pointless loop.

gcc/testsuite/ChangeLog:
2016-05-27  Martin Sebor  <msebor@redhat.com>

PR c++/71306
* g++.dg/warn/Wplacement-new-size-3.C: New test.

From-SVN: r236902
gcc/cp/ChangeLog
gcc/cp/init.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/Wplacement-new-size-3.C [new file with mode: 0644]