Suppose
long long b = 5*1024*1024*1024; // 5 gigs, small enough for 64 bits
printf ("%lu
",sizeof(long long)); // prints 8 (bytes) = 64 bits
but the compiler complains:
warning: integer overflow in expression [-Woverflow]
Why does it overflow, what am I missing?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…