News for hackers. Stuff that matters.
Re:Can code that is valid in both C and C++ produce differen... by simias on Monday October 15, 2012 @05:46AM (#4654346)
Well, sizeof(char) is 1 by definition, so that will never change. Now sizeof(int) is indeed implementation defined (only a minimal range is guaranteed), so technically two different C or C++ implementations might give different results.

It's even possible that sizeof(int) could be 1 on a certain architecture. In that case, both C and C++ would behave in the same way. It might happen on some architectures that don't support byte access and have 16bit-wide chars and ints?

Re:Can code that is valid in both C and C++ produce differen... by viraptor on Monday October 15, 2012 @08:32AM (#4654759)
> architectures that don't support byte access and have 16bit-wide chars and ints?

0x10c ?