[Greg Ewing] > I'm not sure that the proposed alternative (casting both > pointers to ints and comparing the ints) is any better. > Does the C std define the result of doing that to two > unrelated pointers? C99 guarantees that, if the type exists, casting a pointer to type uintptr_t won't blow up, and also guarantees that comparisons between (at least) ints of the same type won't blow up. Beyond that, we don't care what it returns. Mostly we're trying to eliminate warnings Barry has to wade thru from Insure++ -- same reason we have a "no compiler warnings!" build policy. Doing the cast is obviously "better" when viewed through Barry's 4AM eyes. You can find out *why* C has this rule (which was in C89, not new in C99) by reading the C FAQ.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4