https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123939
Bug ID: 123939
Summary: Can't use `auto` type inference even though the RHS
does not declare non ordinary identifiers
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: malekwryyy at gmail dot com
Target Milestone: ---
this code:
```
int main()
{
auto s = ((struct { int : 8; }){}, 0);
}
```
compiled with gcc 16:
```
error: 'struct <anonymous>' defined in underspecified object initializer
3 | auto s = ((struct { int : 8; }){}, 0);
|
```
The declaration does not declare member names (non ordinary identifiers) in the
struct, but gcc rejects it because there is a struct definition on the rhs.