prog.c:5:12: warning: declaration does not declare anything
struct B{};
^
prog.c:8:8: error: redefinition of ‘struct B’
struct B
^
prog.c:5:9: note: originally defined here
struct B{};
^
prog.c: In function ‘main’:
prog.c:12:71: error: expected ‘)’ before ‘:’ token
printf("%d | %d", sizeof(struct A), sizeof(struct B), sizeof(struct A::struct B));
^
prog.c:12:11: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long unsigned int’ [-Wformat=]
printf("%d | %d", sizeof(struct A), sizeof(struct B), sizeof(struct A::struct B));
^
prog.c:12:16: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’ [-Wformat=]
printf("%d | %d", sizeof(struct A), sizeof(struct B), sizeof(struct A::struct B));
^
prog.c:12:9: warning: too many arguments for format [-Wformat-extra-args]
printf("%d | %d", sizeof(struct A), sizeof(struct B), sizeof(struct A::struct B));
^~~~~~~~~