|
5722 | 5722 | \begin{itemize} |
5723 | 5723 | \item If \tcode{P} evaluates to a null pointer value and |
5724 | 5724 | \tcode{J} evaluates to 0, the result is a null pointer value. |
5725 | | -\item Otherwise, if \tcode{P} points to element $\mathtt{x[}i\mathtt{]}$ |
5726 | | -of an array object \tcode{x} with $n$ elements,% |
| 5725 | +\item Otherwise, if \tcode{P} points to an array element $i$ |
| 5726 | +of an array object \tcode{x} with $n$ elements\iref{dcl.array},% |
5727 | 5727 | \footnote{An object that is not an array element is considered to belong to a |
5728 | 5728 | single-element array for this purpose; see~\ref{expr.unary.op}. |
5729 | 5729 | A pointer past the last element of an array \tcode{x} of $n$ elements |
5730 | | -is considered to be equivalent to a pointer to a hypothetical element |
5731 | | -$\mathtt{x[}n\mathtt{]}$ for this purpose; see~\ref{basic.compound}.} |
| 5730 | +is considered to be equivalent to a pointer to a hypothetical array element |
| 5731 | +$n$ for this purpose; see~\ref{basic.compound}.} |
5732 | 5732 | the expressions \tcode{P + J} and \tcode{J + P} |
5733 | 5733 | (where \tcode{J} has the value $j$) |
5734 | | -point to the (possibly-hypothetical) element |
5735 | | -$\mathtt{x[}i + j\mathtt{]}$ if $0 \le i + j \le n$ |
| 5734 | +point to the (possibly-hypothetical) array element |
| 5735 | +$i + j$ of \tcode{x} if $0 \le i + j \le n$ |
5736 | 5736 | and the expression \tcode{P - J} |
5737 | | -points to the (possibly-hypothetical) element |
5738 | | -$\mathtt{x[}i - j\mathtt{]}$ if $0 \le i - j \le n$. |
| 5737 | +points to the (possibly-hypothetical) array element |
| 5738 | +$i - j$ of \tcode{x} if $0 \le i - j \le n$. |
5739 | 5739 | \item Otherwise, the behavior is undefined. |
5740 | 5740 | \end{itemize} |
5741 | 5741 |
|
|
5754 | 5754 | \item If \tcode{P} and \tcode{Q} both evaluate to null pointer values, |
5755 | 5755 | the result is 0. |
5756 | 5756 | \item Otherwise, if \tcode{P} and \tcode{Q} point to, respectively, |
5757 | | -elements $\mathtt{x[}i\mathtt{]}$ and $\mathtt{x[}j\mathtt{]}$ |
| 5757 | +array elements $i$ and $j$ |
5758 | 5758 | of the same array object \tcode{x}, |
5759 | 5759 | the expression \tcode{P - Q} has the value $i - j$. |
5760 | 5760 | \item Otherwise, the behavior is undefined. |
|
0 commit comments