My personal C coding style as of late 2023
&gt; #define sizeof(x)    (size)sizeof(x)<p>I&#x27;m guessing this is lacking an outer pair of parentheses (i.e. it&#x27;s not `((size)sizeof(x))`) on the grounds that they&#x27;re unnecessary.  In terms of operator precedence, casting binds tightly, so if you write e.g. `sizeof(x) * 3`, it expands to `(size)sizeof(x) * 3`, which is equivalent to `((size)sizeof(x)) * 3`: the cast happens before the multiplication.  Indeed, casting binds more tightly than anything that could appear on the right of sizeof(x) – with one exception which is completely trivial.<p>But just for fun, I&#x27;ll point out the exception.  It&#x27;s this:<p><pre><code>    (size)sizeof(x)[y]
</code></pre>
Indexing binds more tightly than casting, so the indexing happens before the cast. 
 In other words, it&#x27;s equivalent to `(size)(sizeof(x)[y])`, not `((size)sizeof(x))[y]`.<p>But you would never see that in a real program, since the size of something is not a pointer or array that can be indexed.  Except that technically, C allows you to write integer[pointer], with the same meaning as pointer[integer].  Not that anyone ever writes code like that intentionally.  But you could.  And if you do, it will compile and do the wrong thing, thanks to the macro lacking the extra parentheses.<p>…On a more substantive note, I quite disagree with the claim that signed sizes are better.  If you click through to the previous arena allocator post, the author says that unsigned sizes are a &quot;source of defects&quot; and in particular the code he presents would have a defect if you changed the signed types to unsigned.  Which is true – but the code as presented <i>also</i> has a bug!  Namely, it will corrupt memory if `count` is negative.  You could argue that the code is correct as long as the arguments are valid, but it&#x27;s very easy for overflow elsewhere in the code to make something accidentally go negative, so it&#x27;s better for an allocator not to exacerbate the issue.<p>With unsigned integers, a negative count is not even representable, and a similar overflow elsewhere in the program would instead give you an extremely high positive count, which the code already checks for.<p>Personally I prefer to use unsigned integers but do as much as possible with bounds-checked wrappers that abort on overflow.  Rarely does the performance difference actually matter.