Macro for counting number of elements in an array
We need to protect a when it's an expression - we've put parens around a[0] where we should have put them around a:

(sizeof(a)/sizeof(a)[0])


For the same reason, I think that the second typeof should be

typeof(&amp;(a)[0])


I have to admit that I can't easily contrive an expression of array type where the parens make a difference, but better safe than sorry...