In the current state, I would say that, unfortunately, it is impossible to use Frama-C to analyze declarations of functions that are not defined or not used.
th:
int mybinding (int x, int y);
This gives you an idea of normalized AST. Normalized means that everything that could be simplified was:
$ frama-c -print th [kernel] preprocessing with "gcc -C -E -I. th"
And unfortunately, since mybinding not used and was not defined, it was deleted.
It is possible to save ads with specifications, but you want to save all ads. I have never noticed such an option:
$ frama-c -kernel-help ... -keep-unused-specified-functions keep specified-but-unused functions (set by default, opposite option is -remove-unused-specified-functions)
And the option to save functions with specifications does not do what you want:
$ frama-c -keep-unused-specified-functions -print th [kernel] preprocessing with "gcc -C -E -I. th"
source share