English
Language : 

CC78K0S Datasheet, PDF (40/520 Pages) NEC – C Compiler Ver.1.30 or Later Language
CHAPTER 2 CONSTRUCTS OF C LANGUAGE
(3) Block scope
Block scope refers to the range of a block (a sequence of declarations and statements enclosed by a pair of
curly braces { } which begins with the opening brace and ends with the closing brace.
Identifiers that are declared inside a block or parameter list all have block scope. An identifier that has block
scope is valid until the innermost brace pair including the declaration of the identifier is closed.
(4) Function prototype scope
Function prototype scope refers to the range of a declared function from its beginning to the end. Identifiers that
are declared inside a parameter list within a function prototype all have function prototype scope. An identifier
that has function prototype scope is valid within a specified function.
2.3.2 Linkage of identifiers
The linkage of identifiers refers to the situation whereby the same identifier declared more than once in different
scopes or in the same scope can be referenced as the same object or function. By being linked, identifiers are
regarded to be one and the same. Identifiers may be linked in the following three different ways: external linkage,
internal linkage and no linkage
(1) External linkage
External linkage refers to identifiers to be linked in translation (compiling) units that constitute the entire program
and as a collection of libraries.
The following identifiers have external linkage examples:
• The identifier of a function declared without storage class specification
• The identifier of an object or function declared as extern, which has no storage class specification
• The identifier of an object which has file scope but has no storage class specification.
(2) Internal linkage
Internal linkage refers to identifiers to be linked within one translation (compiling) unit.
The following identifier has an internal linkage example:
• The identifier of an object or function which has file scope and contains the storage class specifier static.
(3) No linkage
An identifier that has no linkage to any other identifier is an inherent entity.
Examples of identifiers that have no linkage are as follows:
• An identifier which does not refer to a data object or function
• An identifier declared as a function parameter
• The identifier of an object which does not have storage class specifier extern inside a block
40
User’s Manual U14872EJ1V0UM