Ah this is a very good idea. I guess you still have to make sure that all your translation units include this header, which isn't completely foolproof.
Static analysis would probably be more robust, but way more involved.
Static analysis would probably be more robust, but way more involved.