[Bug c++/97632] unhelpful -Winit-list-lifetime warning for default-initialized object in unevaluated context
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Nov 3 15:09:42 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97632
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Marek Polacek <mpolacek@gcc.gnu.org>:
https://gcc.gnu.org/g:f620e64a6f13371b95be5b17abba0acf15bf7cae
commit r11-4670-gf620e64a6f13371b95be5b17abba0acf15bf7cae
Author: Marek Polacek <polacek@redhat.com>
Date: Thu Oct 29 15:08:31 2020 -0400
c++: Disable -Winit-list-lifetime in unevaluated operand [PR97632]
Jon suggested turning this warning off when we're not actually
evaluating the operand. This patch does that.
gcc/cp/ChangeLog:
PR c++/97632
* init.c (build_new_1): Disable -Winit-list-lifetime for an
unevaluated
operand.
gcc/testsuite/ChangeLog:
PR c++/97632
* g++.dg/warn/Winit-list4.C: New test.
More information about the Gcc-bugs
mailing list