4 ms·
This is one instance where C++ and C are, indeed, the same. However, the languages do have their differences, so I would caution those developers who don't ten
by nitrogen 16y ago
This is one instance where C++ and C are, indeed, the same. However, the languages do have their differences, so I would caution those developers who don't tend to read standards not to assume that C and C++ will behave identically when given valid C code. Obviously, having referenced the C++ standard yourself, you are aware of such caveats.
6.5.6.8 from ISO/IEC 9899:201x draft of March 1, 2009:
...If both the pointer
operand and the result point to elements of the same array object, or one past the last
element of the array object, the evaluation shall not produce an overflow; otherwise, the
behavior is undefined....