Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
tedunangst
on Dec 26, 2016
|
parent
|
context
|
favorite
| on:
How to find size of an array in C without sizeof
As far as I know, every compiler is badly broken with arrays greater than SIZE_MAX / 2, so this would be the least of your troubles.
pascal_cuoq
on Dec 27, 2016
[–]
Since I have it at hand, here is a list of examples of how compilers are broken if an array is larger than SIZE_MAX / 2 (which is called PTRDIFF_MAX in the post):
http://trust-in-soft.com/objects-larger-than-ptrdiff_max-byt...
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: