fork(1) download
  1. #include <stdio.h>
  2.  
  3. void func(struct { int x; } p)
  4. {
  5. printf("%i\n", p.x);
  6. }
  7.  
  8. int main(void) {
  9. func((struct { int x; }){8});
  10. return 0;
  11. }
  12.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
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)
           ~~~~~~~~~~~~~~~~~~^
stdout
Standard output is empty