Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
foobar12345quux
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
2 ms
·
1.
▲
by
foobar12345quux
1y ago
Hi Rich, using ptrdiff_t is (alas) the right thing to do: pointer subtraction returns that type, and if the result doesn't fit, you get UB. And ptrdiff_t is a signed type. Assume you successfuly allocate an array "arr" with &