Re:A critique of "How to C in 2016"
by cesarb on Friday January 15, 2016 @07:35AM
(#10908893)
The part I quoted is talking about casting the pointers to uintptr_t (which is defined behavior) and comparing the resulting uintptr_t (since it's an integer, comparing it is defined behavior). It's not talking about comparing the pointers directly (which is undefined behavior). His argument is that, while defined behavior, "(uintptr_t)ptr_a < (uintptr_t)ptr_b" is useless; I disagree, since it's a well-known trick to prevent AB/BA type deadlocks.
[ Parent
| on HN ]
There are no comments on this comment yet.