Re:How to find size of an array in C without sizeof
by tedunangst on Monday December 26, 2016 @04:54PM
(#13259976)
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.
[ Parent
| on HN ]
Re:How to find size of an array in C without sizeof
by pascal_cuoq on Tuesday December 27, 2016 @05:37AM
(#13262405)
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...