English
Language : 

CC78K4 Datasheet, PDF (421/523 Pages) NEC – CC78K4 Ver.2.30 or Later, C Compiler Language
(31) Pascal function
Pascal Function
CHAPTER 11 EXTENDED FUNCTIONS
_ _pascal
FUNCTION
• Generates the code that corrects the stack used for placing of arguments when a function is called on the
called function side, not on the side calling the function.
EFFECT
• Object code can be shortened if a lot of function calls appear.
USAGE
• When a function is declared, a _ _pascal attribute is added to the beginning.
RESTRICTIONS
• The pascal function does not support variable length arguments. If a variable length argument is defined, a
warning is output and the _ _pascal keyword is disregarded.
• In a pascal function, the keywords norec/_ _interrupt/_ _interrupt_brk/_ _rtos_interrupt/_ _flash cannot be
specified. If they are specified, in the case of the norec keyword, the _ _pascal key word is disregarded and
in the case of the _ _interrupt/_ _interrupt_brk/_ _rtos_interrupt/_ _flash keywords, an error is output.
• The old specification function interface specification option (-ZO) does not support the pascal function. When
pascal functions are used, if -ZO is specified, a warning message is output at the first place where a
_ _pascal key word appears and the _ _pascal keywords in the input file are disregarded.
• If a prototype declaration is incomplete, it won’t operate normally, so a warning message is output when a
pascal function’s physical definition or prototype declaration is missing.
EXPLANATION
• The -ZR option enables the change of all functions to the pascal function. However, if the pascal function is
used to change functions that have few function calls, object code may increase.
EXAMPLE
(C source)
_ _pascal int func(int a, int b, int c);
void main()
{
int ret_val;
ret_val = func(5, 10, 15);
User’s Manual U15556EJ1V0UM
421