English
Language : 

CC78K0S Datasheet, PDF (54/520 Pages) NEC – C Compiler Ver.1.30 or Later Language
CHAPTER 3 DECLARATION OF TYPES AND STORAGE CLASSES
3.1 Storage Class Specifiers
A storage class specifier specifies the storage class of an object. It indicates the storage location of the value that
the object has, and the scope of the object. In a declaration, only one storage class specifier can be described. The
following five storage class specifiers are available.
• typedef
• extern
• static
• auto
• register
(1) typedef
The typedef specifier declares a synonym for the specified type. See 3.6 typedef for details of the typedef
specifier.
(2) extern
The extern specifier indicates (tells the compiler) that a variable immediately before this specifier is declared
elsewhere in the program (i.e., an external variable).
(3) static
The static specifier indicates that an object has static storage duration. For an object that has static storage
duration, an area is reserved before the program execution and the value to be stored is initialized only once.
The object exists throughout the execution of the entire program and retains the value last stored in it.
(4) auto
The auto specifier indicates that an object has automatic storage duration. For an object that has automatic
storage duration, an area is reserved when the object enters a block to be declared.
At entry into the declared block from its top, the object is initialized if so specified. If the object enters the block
by jumping to a label within the block, the object will not be initialized.
The area reserved for an object with automatic storage duration will not be guaranteed after the execution of the
declared block.
(5) register
The register specifier indicates that an object is assigned to a register of the CPU. With this C compiler, it is
allocated to the register or saddr area of the CPU. See CHAPTER 11 EXTENDED FUNCTIONS for details of
register variables.
54
User’s Manual U14872EJ1V0UM