Q: Do all declarations for the same static function or variable have to include the storage class static?
A: The language in the Standard does not quite require this (what's most important is that the first declaration contain static), but the rules are rather intricate, and are slightly different for functions than for data objects. (There has also been a lot of historical variation in this area.) Therefore,
it's safest if static appears consistently in the definition and all declarations.