Previous Table of Contents "New C Standard" commentary
relational-expression: shift-expression relational-expression < shift-expression relational-expression > shift-expression relational-expression <= shift-expression relational-expression >= shift-expression
1198 One of the following shall hold:
1199 both operands have real type;
1200 both operands are pointers to qualified or unqualified versions of compatible object types; or
1201 both operands are pointers to qualified or unqualified versions of compatible incomplete types.
1202 If both of the operands have arithmetic type, the usual arithmetic conversions are performed.
1203 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.
1204 When two pointers are compared, the result depends on the relative locations in the address space of the objects pointed to.
1205 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.
1206 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.
1207 All pointers to members of the same union object compare equal.
If the expression
1209 In all other cases, the behavior is undefined.
Each of the operators
The result has type
Created at: 2008-01-30 02:39:43
The text from WG14/N1256 is copyright © ISO
Created at: 2008-01-30 02:39:43 The text from WG14/N1256 is copyright © ISO