From Jason Turner

[expr.add]

Diff to HTML by rtfpessoa

tmp/tmppgwzq98h/{from.md → to.md} RENAMED
@@ -68,11 +68,17 @@ to the last element of the same array object, the expression
68
  `-((P)-((Q)+1))`, and has the value zero if the expression `P` points
69
  one past the last element of the array object, even though the
70
  expression `(Q)+1` does not point to an element of the array object.
71
  Unless both pointers point to elements of the same array object, or one
72
  past the last element of the array object, the behavior is
73
- undefined.[^25]
 
 
 
 
 
 
74
 
75
  If the value 0 is added to or subtracted from a pointer value, the
76
  result compares equal to the original pointer value. If two pointers
77
  point to the same object or both point one past the end of the same
78
  array or both are null, and the two pointers are subtracted, the result
 
68
  `-((P)-((Q)+1))`, and has the value zero if the expression `P` points
69
  one past the last element of the array object, even though the
70
  expression `(Q)+1` does not point to an element of the array object.
71
  Unless both pointers point to elements of the same array object, or one
72
  past the last element of the array object, the behavior is
73
+ undefined.[^26]
74
+
75
+ For addition or subtraction, if the expressions `P` or `Q` have type
76
+ “pointer to cv `T`”, where `T` is different from the cv-unqualified
77
+ array element type, the behavior is undefined. In particular, a pointer
78
+ to a base class cannot be used for pointer arithmetic when the array
79
+ contains objects of a derived class type.
80
 
81
  If the value 0 is added to or subtracted from a pointer value, the
82
  result compares equal to the original pointer value. If two pointers
83
  point to the same object or both point one past the end of the same
84
  array or both are null, and the two pointers are subtracted, the result