[Bug c/63944] [DR#413] Partial overriding of nonconstant struct/union initializers with designated initializers
joseph at codesourcery dot com
gcc-bugzilla@gcc.gnu.org
Wed Nov 19 00:42:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63944
--- Comment #1 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
Actually, I suppose the existing approach for strings could be used if
desired - split the struct into a series of component references to a
SAVE_EXPR of the nonconstant struct initializer (in the case of a union,
the partially overriding initializer would say which union element needs
splitting like that). Whether that's desirable is another matter (say the
struct being partially overridden is struct S { int a[1000000]; } -
splitting into separate initializers would mean 1000000 SAVE_EXPRs, which
seems unlikely to work well).
More information about the Gcc-bugs
mailing list