3 ms·
If so, it's one that's been introduced at some point post C99 -- the C99 spec explicitly defines the behaviour of NULL == NULL. Section 6.5.9 para 6 says "Two p
by pm215 2y ago
If so, it's one that's been introduced at some point post C99 -- the C99 spec explicitly defines the behaviour of NULL == NULL. Section 6.5.9 para 6 says "Two pointers compare equal if and only if both are null pointers, both are pointers to the same object [etc etc]".
- dwattttt 2y agoI don't imagine NULL is defined as "pointing to an object", so I don't expect that clause to apply.
- tsimionescu 2y agoYou completely skipped over the first part: "Two pointers compare equal if and only if both are null pointers"
- dwattttt 2y agoCan't get much more of a reading comprehension failure than that. Good thing I don't write compilers.
- tsimionescu 2y agoHappens to everyone, don't worry, especially when trying to focus on details, ironically...
- lelanthran 2y ago> You completely skipped over the first part: "Two pointers compare equal if and only if both are null pointers" Maybe he elided it in an optimisation pass?