I was shifting around the 'C' standard and I came across this:
$6.7.9.5:
If the declaration of an identifier has block scope, and the identifier has external or internal linkage, the declaration shall have no initializer for the identifier.
So my question is on the title. I would also like some examples if possible.
static int i; // internal linkage
void f() {
extern int i; // block-scope declaration; refers to i in global scope
// still internal linkage - see 6.2.2/4
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With