3 ms·
> gets the meaning of C's static exactly backwards Which one? It has multiple. First, there is storage duration: C99 6.2.4 "There are three storage durations
by kazinator 8y ago
> gets the meaning of C's static exactly backwards
Which one? It has multiple.
First, there is storage duration:
C99 6.2.4 "There are three storage durations: static, automatic, and allocated."
Variables with external linkage defined at file scope are static in the sense that they have static storage duration; it is not incorrect to call them static variables, though a bit unusual. If they have external linkage, it's more common just to call them globals.
The static storage class specifier keyword used at file scope causes a name to have internal linkage. In a block scope, it requests the above static storage duration.
- tom_mellior 8y ago> Which one? The one that was entirely clear from context: Linkage.