[Bug c++/101767] [11 Regression] Aggregate initialization fails for struct that has both unnamed struct and union fields
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu May 12 21:14:32 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101767
--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:
https://gcc.gnu.org/g:846bff4d4659d9b2026da574194599f38a00cc79
commit r10-10718-g846bff4d4659d9b2026da574194599f38a00cc79
Author: Jason Merrill <jason@redhat.com>
Date: Fri Mar 18 14:36:19 2022 -0400
c++: designator and anon struct [PR101767]
We found .x in the anonymous struct, but then didn't find .y there; we
should decide that means we're done with the struct rather than that the
code is wrong.
PR c++/101767
gcc/cp/ChangeLog:
* decl.c (reshape_init_class): Back out of anon struct
if a designator doesn't match.
gcc/testsuite/ChangeLog:
* g++.dg/ext/anon-struct10.C: New test.
More information about the Gcc-bugs
mailing list