[Bug c++/90951] [8/9/10 Regression] error initializing a constexpr array of a struct with const member
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Feb 4 22:27:00 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90951
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <jason@gcc.gnu.org>:
https://gcc.gnu.org/g:0712ea6313bc44f9ae8feb235c1b02c92cdd0527
commit r10-6437-g0712ea6313bc44f9ae8feb235c1b02c92cdd0527
Author: Jason Merrill <jason@redhat.com>
Date: Tue Feb 4 15:54:17 2020 -0500
c++: Fix constexpr vs. omitted aggregate init.
Value-initialization is importantly different from {}-initialization for
this testcase, where the former calls the deleted S constructor and the
latter initializes S happily.
PR c++/90951
* constexpr.c (cxx_eval_array_reference): {}-initialize missing
elements instead of value-initializing them.
More information about the Gcc-bugs
mailing list