In C99 6.7.1 it says
At most, one storage-class specifier may be given in the declaration
specifiers in a declaration
I know extern and static are both storage class specifiers but extern basically states to the compiler that the variable is declared elsewhere and worry about it later. extern and static to me are NOT mutually exclusive. It is very well possible that something could be extern and static.
Why can’t we use extern and static together? Is there a good reason other than the standard simply says, no?
Well,
staticmeansInternal Linkage,externmeansExternal Linkage.Internal Linkagerefers to everything only in scope of a Translation unit.External Linkagerefers to things that exist beyond a particular translation unit. In other words, accessable through the whole program.So both are mutually exclusive.