boot2

Playing with the boostrap
git clone https://git.ryansepassi.com/git/boot2.git
Log | Files | Refs | README

348-unsigned-div-rem.c (335B)


      1 int main(void) {
      2   unsigned long all = ~0UL;
      3   unsigned int word = ~0U;
      4 
      5   if (sizeof all == 8) {
      6     if (all / 8UL != 2305843009213693951UL) return 1;
      7   } else if (all / 8UL != 536870911UL) {
      8     return 1;
      9   }
     10   if (all % 10UL != 5UL) return 2;
     11   if (word / 3U != 1431655765U) return 3;
     12   if (word % 7U != 3U) return 4;
     13   return 0;
     14 }