fork download
  1. struct Base { int a; };
  2.  
  3. union TestFails
  4. {
  5. struct : Base {} foo;
  6. int b;
  7. };
  8.  
  9. union TestWorks
  10. {
  11. struct { int a; } foo;
  12. int b;
  13. };
  14.  
  15. int main()
  16. {
  17. TestWorks works;
  18. works.foo.a = 0;
  19.  
  20. TestFails fails;
  21. fails.foo.a = 0;
  22.  
  23. return 0;
  24. }
Success #stdin #stdout 0s 3452KB
stdin
Standard input is empty
stdout
Standard output is empty