This assertion tells KAP that listed objects (variables, arrays, items pointed to with a pointer) do not overlap in memory. The syntax of this pragma is as follows:
#pragma _KAP distinct (expr1, expr2[, expr3,...])
Where expr1, expr2,...
represent objects. The form is
as follows:
id
- a variable
*id
- what the pointer id
points to
id[]
- the array whose name is id
For example, if the object pointed to by a pointer p
never overlaps with the array a[i]
for any
i
used in the program, this can be asserted with
#pragma _KAP distinct (*p, a[])
.
All variables specified in this assertion must have been previously declared.
The range of this assertion is the function where it was written and any succeeding functions. If this assertion is made about local variables or function parameters, it will have no effect outside the immediate function.