PR c++/67942 - diagnose placement new buffer overflow
commite520488ce33215fb02415584f06e52db86cf7cd1
authormsebor <msebor@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 5 Nov 2015 21:42:10 +0000 (5 21:42 +0000)
committermsebor <msebor@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 5 Nov 2015 21:42:10 +0000 (5 21:42 +0000)
treece31107d94774a8f934fd4e3164132222d38368f
parent7eef40851b74e8c3d788f97c22fd8d2b738062ae
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229827 138bc75d-0d04-0410-961f-82ee72b054a4
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]