There is an option for that but I have to look it up. The verbosity can be raised through the -v<xxx> options.
Anyway, the compiler will remove unused procedures and functions. And WPO can remove even more.
So basically, because of the above I just leave that code in my units.
[edit]
compile with -vh or -vhl and you get the hints about unused procedures and functions.
Or turn hints on in Lazarus if it happens to be off. That should work. E.g.
teststrptr.pas(3,11) Hint: Local proc "dummy" is not used
Note this option can be very verbose on large files. You can use grep to filter them out.