You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
causes overflow. long on my machine is 32-bit (printf("%ld\n", LONG_MAX); prints 2147483647), and compiler would give a warning -Wshift-count-overflow on that line. Indeed long type cannot hold that prime number.
I suspect it could be corrected as
unsigned long p = (1L<<32) - 5;
with printf("%lu\n", p); prints 4294967291, which is desired.
However the -Wshift-count-overflow warning: left shift count >= width of type still persists.