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

--- Comment #4 from Roman Perepelitsa <roman.perepelitsa at gmail dot com> ---
Please take a look at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71446#c1.
This code compiles. Given that it contains `{.value = 0}`, one would reasonably
expect that it creates an instance of a struct with the data member `value` set
to zero. However, it doesn't. The literal `{.value = 0}` creates an instance of
type `std::initialize_list<int>`. This is very misleading. The code should
either not compile or do what was intended (which is also what C++20 requires
and what clang does).

Reply via email to