[Bug c++/105059] Inconsistency between paren- and brace-initialization of a union with anonymous struct
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Dec 7 02:38:16 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105059
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|accepts-invalid |documentation
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Last reconfirmed| |2022-12-07
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
With -pedantic:
<source>:2:12: warning: ISO C++ prohibits anonymous structs [-Wpedantic]
2 | struct {
| ^
So I think this is just a documentation issue of what anonymous struct means
with each of the initializers.
Yes there is an inconsitancy with respect to () vs {} here though.
Confirmed.
More information about the Gcc-bugs
mailing list