https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67942
--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> --- Author: msebor Date: Thu Nov 5 21:42:10 2015 New Revision: 229827 URL: https://gcc.gnu.org/viewcvs?rev=229827&root=gcc&view=rev Log: 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. Added: trunk/gcc/testsuite/g++.dg/warn/Wplacement-new-size.C Modified: trunk/gcc/ChangeLog trunk/gcc/c-family/ChangeLog trunk/gcc/c-family/c.opt trunk/gcc/cp/ChangeLog trunk/gcc/cp/init.c trunk/gcc/doc/invoke.texi trunk/gcc/testsuite/ChangeLog