Syntactic components
The following pages describe the syntactical components that can be used by the stack usage control directives.
category
Syntax
[ name ]Description
A call graph root category. You can use any name you like. Categories are not case-sensitive.
Example
category examples:
[interrupt] [task]
func-spec
Syntax
[?] name[module-spec]
Description
Specifies the name of a symbol, and for module-local symbols, the name of the module it is defined in. Normally, if func-spec does not match a symbol in the program, a warning is emitted. Prefixing with ? suppresses this warning.
Example
func-spec examples:
xFun MyFun [file.o] ?"fun1(int)"
module-spec
Syntax
[name [(name) ]]
Description
Specifies the name of a module, and optionally, in parentheses, the name of the library it belongs to. To distinguish between modules with the same name, you can specify:
The complete path of the file ("
D:\C1\test\file.o")As many path elements as are needed at the end of the path ("
test\file.o")Some path elements at the start of the path, followed by
"...", followed by some path elements at the end ("D:\...\file.o").
Note
When using multi-file compilation (‑‑mfc), multiple files are compiled into a single module, named after the first file.
Example
module-spec examples:
[file.o] [file.o(lib.a)] ["D:\C1\test\file.o"]
name
Description
A name can be either an identifier or a quoted string.
The first character of an identifier must be either a letter or one of the characters "_", "$", or ".". The rest of the characters can also be digits.
A quoted string starts and ends with " and can contain any character. Two consecutive " characters can be used inside a quoted string to represent a single ".
Example
name examples:
MyFun file.o "file-1.o"
call-info
Syntax
callsfunc-spec[ ,func-spec... ][ :stack-size]
Description
Specifies one or more called functions, and optionally, the stack size at the calls.
Example
call-info examples:
calls MyFunc1 : stack 16 calls MyFunc2, MyFunc3, MyFunc4
stack-size
Syntax
[ stack ] size
([ stack ] size)Description
Specifies the size of a stack frame. A stack may not be specified more than once.
Example
stack-size examples:
24 stack 28
size
Description
A decimal integer, or 0x followed by a hexadecimal integer. Either alternative can optionally be followed by a suffix indicating a power of two (K=210, M=220, G=230, T=240, P=250).
Example
size examples:
24 0x18 2048 2K