Open soulne4ny opened 7 years ago
http://hyperpolyglot.org/c
sizeof 1 + 1 is not 4 on intel, but 5! sizeof is unary operator of higher priority than plus. That's why, it is not the same as golang's unsafe.Sizeof(1 + 1) which gives 8 on intel.
sizeof 1 + 1
sizeof
unsafe.Sizeof(1 + 1)
if this is true bump
don't you see difference between sizeof (1 + 1) and sizeof 1 + 1?
sizeof (1 + 1)
http://hyperpolyglot.org/c
sizeof 1 + 1
is not 4 on intel, but 5!sizeof
is unary operator of higher priority than plus. That's why, it is not the same as golang'sunsafe.Sizeof(1 + 1)
which gives 8 on intel.