https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104847
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
struct S { int i; };
union U { S k; };
template <class T, class... Ts> T sink(T&&, Ts&&...);
template <class T>
decltype(sink(U{.k={.i=1}},T())) f(T) { return U{1}; }
int main() { f(3); }
compiles fine. I guess the question is if ce->index == NULL should be mangled
without the di production of <braced-expression>, or we should implicitly find
the first initializable field and use that with di, i.e. if this should mangle
as
_Z1fIiEDTcl4sinktl1Udi1kilLi1EEEcvT__EEES1_
or as
_Z1fIiEDTcl4sinktl1ULi1EEcvT__EEES1_