An identifier declared in different scopes or in the same scope more than once can be made to refer to the same object or function by a process called linkage. There are three kinds of linkage: external, internal, and none.
For an identifier declared with the storage-class specifier extern, if the prior declaration specifies internal or
external linkage, the linkage of the identifier at the later declaration is the same as the
linkage specified at the prior declaration. If no prior declaration is visible, or if the prior
declaration specifies no linkage, then the identifier has external linkage
If the declaration of a file scope identifier for an object or a function contains the storageclass
specifier static, the identifier has internal linkage
Each declaration of an identifier with no linkage denotes a unique entity such as an identifier declared to be a function parameter or a block scope
identifier for an object declared without the storage-class specifier extern.
No comments:
Post a Comment