Clang disallows brace elision in designated initializer of member array when constructing a temporary function parameter #121553
Labels
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
diverges-from:edg
Does the clang frontend diverge from edg compiler
diverges-from:gcc
Does the clang frontend diverge from gcc on this issue
diverges-from:msvc
Does the clang frontend diverge from msvc on this issue
Clang rejects the following valid code:
The question seems to be related to both the designated initializer and the brace elision operation because separately removing the former( like
C c({42});
) or the latter( likeC c ({.b = {42}});
) can both make the code compile.GCC, MSVC, and EDG always accept it.
The diagnostic of clang:
https://godbolt.org/z/eve54hcx3
The text was updated successfully, but these errors were encountered: