relational-expression: shift-expression relational-expression < shift-expression relational-expression > shift-expression relational-expression <= shift-expression relational-expression >= shift-expression
1188 One of the following shall hold:
1189 both operands have real type;
1190 both operands are pointers to qualified or unqualified versions of compatible object types; or
1191 both operands are pointers to qualified or unqualified versions of compatible incomplete types.
1192 If both of the operands have arithmetic type, the usual arithmetic conversions are performed.
1193 For the purposes of these operators, a pointer to an object that is not an element of an array behaves the same as a pointer to the first element of an array of length one with the type of the object as its element type.
1194 When two pointers are compared, the result depends on the relative locations in the address space of the objects pointed to.
1195 If two pointers to object or incomplete types both point to the same object, or both point one past the last element of the same array object, they compare equal.
1196 If the objects pointed to are members of the same aggregate object, pointers to structure members declared later compare greater than pointers to members declared earlier in the structure, and pointers to array elements with larger subscript values compare greater than pointers to elements of the same array with lower subscript values.
1197 All pointers to members of the same union object compare equal.
1198
If the expression
1199 In all other cases, the behavior is undefined.
1200
Each of the operators
1201
The result has type
Next
Created at: 2005-06-29 02:19:00
The text from WG14/N1124 is copyright © ISO