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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to наб from comment #3)
> Sure, I build with -Wno-c99-extensions so I didn't really clock it.
> 
> Even if you consider GCC erroring on this instead of warning to be correct
> (which I don't think is useful to anyone), the error is meaningless
> as-issued. In the original


It is correct because GCC's C++ front-end does not support this as an
extension.



> this indicates that GCC wants... all members of sa? to be initialised? when
> this isn't a requirement anywhere else?

Actually that is a requirement of C++ designated initializers.

C++20 designated initializers is not the same as C99 designated initializers at
all and should not be treated the same either. Yes they have a similar syntax
but they are not the same. Yes most (I think all) C++20 designated initializers
are valid C99 designated initializers yes but not the other way around.

Reply via email to