On Mon, 25 Nov 2019 at 12:18, Florian Weimer wrote: > > * Jonathan Wakely: > > > Why do you expect a different result for these? > > > > A small = 1 << 40; > > B big = 1 << 40; > > > > In both cases the expression is 1 << 40, the type of A or B is irrelevant. > > Some languages define integer literals in such a way that they have > types which do not exist at run time and evaluate constant expressions > with infinite precision. Yes, but C and C++ do not do that. Understanding the language you're programming in is important.