https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79937

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|jason at gcc dot gnu.org           |unassigned at gcc dot 
gnu.org

--- Comment #11 from Jason Merrill <jason at gcc dot gnu.org> ---
Consider also

struct X
{
  unsigned i;
  unsigned n = bar(X{2,i});
};

which would also have an X PLACEHOLDER_EXPR, but it would refer to the outer X
rather than the temporary.

It seems like maybe we need to defer NSDMI expansion in aggregate
initialization until we know which object we're initializing.

But Jakub's patch is an improvement over what we have now, and may be the right
choice for GCC 8.

Reply via email to