fork download
  1. #include <iostream>
  2.  
  3. struct bits
  4. {
  5. signed int field : 5;
  6. };
  7.  
  8. int main()
  9. {
  10. bits a = { -16 };
  11. bits b = { 28 };
  12.  
  13. bits c = { a.field - b.field };
  14. std::cout << c.field << std::endl;
  15. }
Success #stdin #stdout 0s 2724KB
stdin
Standard input is empty
stdout
-12