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