PR c++/69662 - -Wplacement-new on allocated one element array members
gcc/testsuite/ChangeLog:
PR c++/69662
* g++.dg/warn/Wplacement-new-size-1.C: New test.
* g++.dg/warn/Wplacement-new-size-2.C: New test.
gcc/cp/ChangeLog:
PR c++/69662
* init.c (find_field_init): New function.
(warn_placement_new_too_small): Call it. Handle one-element arrays
at ends of structures special.
gcc/c-family/ChangeLog:
PR c++/69662
* c.opt (Warning options): Update -Wplacement-new to take
an optional argument.
gcc/ChangeLog:
PR c++/69662
* doc/invoke.texi: Update -Wplacement-new to take an optional
argument.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233190 138bc75d-0d04-0410-961f-82ee72b054a4