Analyzing Program Performance With Sun WorkShop

declare func_ptr targets func

Adds the specified functions to the list of functions that could be called through the specified function pointer.

LockLint manages to gather a good deal of information about function pointer targets on its own by watching initialization and assignments. For example, for the code


struct foo { int (*fp)(); } foo1 = { bar };

LockLint does the equivalent of the command


% lock_lint declare foo::fp targets bar


Caution - Caution -

LockLint does not yet do the following (for the above example):


% lock_lint declare foo1.fp targets bar

However, it does manage to do both for assignments to function pointers. See "Lock Inversions".