[SVN r24521]
- some refactoring of the code - now detects forward declarations and prints a warning about them [SVN r18187]