kit

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

6_5_58_large_integer_immediates.c (517B)


      1 static unsigned long long add_ull(unsigned long long a, unsigned long long b) {
      2   return a + b;
      3 }
      4 
      5 int test_main(void) {
      6   unsigned long long high = 9223372036854775808ULL;
      7   unsigned long long all = 18446744073709551615ULL;
      8   if (high + high != 0ULL) return 1;
      9   if (add_ull(9223372036854775808ULL, 9223372036854775807ULL) != all) return 2;
     10   if ((long long)9223372036854775808ULL != -9223372036854775807LL - 1LL)
     11     return 3;
     12   if (9223372036854775807LL + (-9223372036854775807LL) != 0LL) return 4;
     13   return 42;
     14 }