I think it would be a ok to define an interface for GCC to link with source-analyzing code. At least, I don't see any particular problem in it. It would be like adding such code to GCC, more or less.