-termination-functions
Specify process termination functions
Syntax
-termination-functions function1[,function2[,...]]
Description
-termination-functions
specifies functions that behave like the exit function and terminate
your program.function1[,function2[,...]]
Use this option to specify program termination functions that are declared but not defined in your code.
In the user interface (Polyspace® desktop products only), on the Configuration pane, enter this
option in the Other field. See Other.
Examples
Polyspace detects an Integer division by zero defect in the following
code because it does not recognize that my_exit terminates the program.
void my_exit(void);
void main() {
double ans;
ans = reciprocal(1);
ans = reciprocal(0);
}
double reciprocal(int val) {
if(val==0)
my_exit();
return (1/val);
}-termination-functions
option:polyspace-bug-finder -termination-functions my_exit