Hacker News new | ask | show | jobs
by shrimp_emoji 1141 days ago
Trying to figure out whether it's well-defined to compare two pointers to different objects in memory...

...By reading the C++ standard: "it's well-defined"

...By reading the C standard: *self-referencing Zalgo text quoted by dozens of StackOverflow thread debates where no completely confident conclusion is ever reached, although 3/4 people way smarter than you think it's well-defined and blame observations to the contrary on compiler bugs which they've reported to all the major compiler maintainers with varying reception from said maintainers as to whether they agree that those are actually bugs, forcing you, at the end of the day, to realize that you should really be writing your compiler's C, not aspiring to a universal, platonic ideal of C*

1 comments

Why? I do not find the wording in the C standard less clear than the C++ wording (where the result is unspecified for unrelated pointers).