J
junky_fellow
Hi,
I discussed about this earlier as well but I never got any
satisfactory answer. So, I am initiating this again.
Page 84, WG14/N869
"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."
First of all what is the meaning of "overflow" here ?
I wanted to know, what is so speacial about the element one past last
element of the array object. What is the reason that pointer pointing
to element one past the last element will not produce overflow ? I mean
to say, what was the need that the standard required "one past last
element" to be always a valid pointer ?
I discussed about this earlier as well but I never got any
satisfactory answer. So, I am initiating this again.
Page 84, WG14/N869
"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."
First of all what is the meaning of "overflow" here ?
I wanted to know, what is so speacial about the element one past last
element of the array object. What is the reason that pointer pointing
to element one past the last element will not produce overflow ? I mean
to say, what was the need that the standard required "one past last
element" to be always a valid pointer ?