Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
omniscient_oce
on Oct 10, 2023
|
parent
|
context
|
favorite
| on:
My personal C coding style as of late 2023
Can anyone explain the use of ptrdiff_t instead of size_t (he has typedef'd "size" for ptrdiff_t) The macros are wrapping _Alignof and sizeof both which can't return non-zero numbers I thought.
bergkvist
on Oct 10, 2023
[–]
ptrdiff_t is a signed integer type - which means you can subtract these numbers without worrying about underflow
Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: