kit

kit
git clone https://git.ryansepassi.com/git/kit.git
Log | Files | Refs | README

6_6_11_unsigned_const_expr.c (458B)


      1 _Static_assert(0u - 1u > 1u, "unsigned constants wrap modulo width");
      2 _Static_assert(!(-1 < 1u), "usual arithmetic conversions choose unsigned");
      3 _Static_assert(2147483648 > 0, "decimal constants choose a wider signed type");
      4 _Static_assert(0xffffffff > 0, "hex constants may choose unsigned int");
      5 _Static_assert((int)1.75 == 1, "floating constant may be cast in an ICE");
      6 
      7 enum { K = (unsigned char)260 + (1 ? 38 : 0) };
      8 
      9 int test_main(void) { return K; }