Assuming field isn’t a template that has been declared, the program is ill-formed.
But I do not understand what it is declaring: what is this field ?
Clang AST says:
`-CXXRecordDecl 0xdb6f20 <test.cpp:1:1, line:3:1> line:1:8 struct foo definition
`-FieldDecl 0xdb7168 <line:2:3> col:7 'int'
Clang AST for a program with int field;:
`-CXXRecordDecl 0x168af90 <test2.cpp:1:1, line:3:1> line:1:8 struct foo definition
`-FieldDecl 0x168b150 <line:2:3, col:7> col:7 field 'int'
So, it looks like Clang thinks that an int field is being declared, but the name of the field is empty. This seems to be corroborated by being able to initialise this “unnamed” field:
foo f{0}; // compiles in Clang
The first Clang version to have this bug seems to be 9: https://gcc.godbolt.org/z/d386oz8v8