fork download
  1. #include <stdio.h>
  2.  
  3. struct Point {
  4. int x;
  5. int y;
  6. };
  7.  
  8. #define $r (_r)
  9. #define fork(expr, f) ({ typeof(expr) _r = (expr); if(1) f; _r; })
  10.  
  11. int main() {
  12. Point p;
  13. Point q = fork(p, {
  14. $r.x = 1;
  15. });
  16. printf("%i", q.x);
  17. return 0;
  18. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
1