https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88158
Bug ID: 88158
Summary: Document designated initializer support in C++
Product: gcc
Version: 9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: sandra at gcc dot gnu.org
Target Milestone: ---
The GCC manual section on designated initializers says "This extension is not
implemented in GNU C++." But, by experimentation, I found that g++ does accept
the designated initializer syntax but complains if the fields aren't named in
the order they appear in the struct definition.
Also, I found this patch via inspection of the code and "svn blame"
https://gcc.gnu.org/ml/gcc-patches/2017-11/msg01026.html
which implements C++2A designated initializers. The manual ought to say that
is supported, in addition to documenting whatever it is that g++ accepts in
non-C++2A mode.
I'm not an expert on the c++ front end, so maybe someone more familiar with
this code can clarify what is going on here and I can beat it into shape for
the manual.