[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
Thu May 12 21:14:32 GMT 2022
--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jason Merrill
Author: Jason Merrill <email@example.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.
* decl.c (reshape_init_class): Back out of anon struct
if a designator doesn't match.
* g++.dg/ext/anon-struct10.C: New test.
More information about the Gcc-bugs