https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67942
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |msebor at gcc dot gnu.org --- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> --- A patch capable of detecting and diagnosing a limited subset of such overflows will be posted for review shortly. The output of the patch for the example program in the Description is as follows: $ g++ -Wall u.cpp u.cpp: In function ‘void f(S*)’: u.cpp:22:27: warning: placement new constructing a 16-byte object of type ‘S’ in a region of type ‘char [8]’ that is 8 bytes large S *t = new (buf) S (*s);