#include <stdio.h> void func(struct { int x; } p) { } int main(void) { func((struct { int x; }){8}); return 0; }
Standard input is empty
prog.c:3:11: warning: anonymous struct declared inside parameter list will not be visible outside of this definition or declaration
void func(struct { int x; } p)
^~~~~~
prog.c: In function ‘main’:
prog.c:9:26: error: incompatible type for argument 1 of ‘func’
func((struct { int x; }){8});
^~~
prog.c:3:29: note: expected ‘struct <anonymous>’ but argument is of type ‘struct <anonymous>’
void func(struct { int x; } p)
~~~~~~~~~~~~~~~~~~^
Standard output is empty