-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillac++20clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"
Description
| Bugzilla Link | 47694 |
| Version | trunk |
| OS | All |
| Reporter | LLVM Bugzilla Contributor |
| CC | @pogo59,@zygoloid |
Extended Description
Hi,
This code snippet is taken from P0329R4.
struct A
{
int x;
};
struct B
{
A a;
};
int main()
{
B b{.a.x = 0};
return 0;
}GCC fails to compile this example, which should be invalid according to the C++20 standard.
GCC error:
error: expected primary-expression before '.' token
13 | B b{.a.x = 0};
Metadata
Metadata
Assignees
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillac++20clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"
Type
Projects
Status
Done