PR c++/67942 - diagnose placement new buffer overflow
authorMartin Sebor <msebor@redhat.com>
Thu, 5 Nov 2015 21:42:10 +0000 (21:42 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Thu, 5 Nov 2015 21:42:10 +0000 (14:42 -0700)
commite2f5cc96e5c4abde5879269220404fdd3e6efca2
treece31107d94774a8f934fd4e3164132222d38368f
parent60f2d2f36d770c7d771ee5c1b3ae5a7b7169f894
PR c++/67942 - diagnose placement new buffer overflow

gcc/
        * invoke.texi (-Wplacement-new): Document new option.
* gcc/testsuite/g++.dg/warn/Wplacement-new-size.C: New test.

gcc/c-family/
        * c.opt (-Wplacement-new): New option.

gcc/cp/
* cp/init.c (warn_placement_new_too_small): New function.
(build_new_1): Call it.

gcc/testsuite/
        * g++.dg/warn/Wplacement-new-size.C: New test.

From-SVN: r229827
gcc/ChangeLog
gcc/c-family/ChangeLog
gcc/c-family/c.opt
gcc/cp/ChangeLog
gcc/cp/init.c
gcc/doc/invoke.texi
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/Wplacement-new-size.C [new file with mode: 0644]