calls
In this section:
Syntax
#pragma calls=arg[,arg...]
Parameters
arg can be one of these:
| A declared function |
| A string that represents the name of a function category |
Description
Use this pragma directive to specify all functions that can be indirectly called in the following statement. This information can be used for stack usage analysis in the linker. You can specify individual functions or function categories. Specifying a category is equivalent to specifying all included functions in that category.
Example
void Fun1(), Fun2();
void Caller(void (*fp)(void))
{
#pragma calls = Fun1, Fun2, "Cat1"
(*fp)(); // Can call Fun1, Fun2, and all
// functions in category "Cat1"
}