17 Oct
2012
17 Oct
'12
7:59 a.m.
Phil Mayers wrote:
TBH it's a fairly theoretical argument; sizeof is used on objects whose size tends to be in the range 1-100k and specified at compile time. The odds of sizeof ever returning >2**31 are very, very remote, at least with current system architectures.
Yeah. But I'm (finally) OK with using C99 features. I avoided them for a while, because so many systems didn't support even C89. So changing all of the code to use %zu for size_t, and %zd for ssize_t is probably OK. I would STRONGLY avoid casts. They're an ugly brute-force solution to a simple problem. Alan DeKok.