https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67942

--- Comment #5 from Martin Sebor <msebor at gcc dot gnu.org> ---
Author: msebor
Date: Fri Nov  6 01:08:53 2015
New Revision: 229831

URL: https://gcc.gnu.org/viewcvs?rev=229831&root=gcc&view=rev
Log:
PR c++/67942 - diagnose placement new buffer overflow

gcc/cp/
        * cp/init.c (warn_placement_new_too_small): Avoid assuming
        the size of the first operand of placement new or its type
        is known.

gcc/testsuite/
        * g++.dg/warn/Wplacement-new-size.C: Exercise placement new
        invocations where the size of the destination buffer object
        or its type (or both) is unknown.

Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/init.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/g++.dg/warn/Wplacement-new-size.C

Reply via email to