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

--- Comment #12 from Carlos Galvez <carlosgalvezp at gmail dot com> ---
@Jonathan Wakely,

> When the standard is clarified, GCC will implement the new rules.

I came across DR 2227, which is already part of the standard:

https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0968r0.html#2227
https://eel.is/c++draft/dcl.init.aggr#10

> The destructor for each element of class type other than an anonymous union 
> member is potentially invoked ([class.dtor]) from the context where the 
> aggregate initialization occurs.

Isn't "the context where aggregate initialization occurs" the `main` function?

Reply via email to