If I can quote c11 Standard: §6.5.9¶2 Restrictions on ==:
One of the following:
- both operands are of arithmetic type;
- both operands are pointers to qualified or unskilled versions of compatible types;
- one operand is a pointer to the type of object, and the other is a pointer to a qualified or unskilled version of void; or
- , - .
, , - . (? §6.5.9¶6
, , ( ) , , - , - ,
1) (§6.5.9¶6) - , , , ==, . , , .
, , .
- . §6.5.8¶5 ( )
, ... undefined.
- - . , undefined.
:
, - - . - , , . ? . , , , . ? , . -
:
- , ptr < NULL . , - §6.5.8¶5. , , ptr < NULL , , .