On 22 October 2013 21:07, Andrew MacLeod <amacl...@redhat.com> wrote:
> I think this is transitional. Its such a mess right now, that I think we > need to flatten the entire thing, and then rebuild it with some modular > design in place such that routines and data structures are where they > belong. then we can consider including things that are prerequesites. Hmm. It seems this include dependency morass is really a trap for any big C / C++ project. And once you have straightened it out, it'll might creep back over the years as more data structure redesign and refactoring goes on. I wonder what it'd take to have a cpp extension to include a file in such a manner as to emit a diagnostic if the items declared / #defined inside are used directly by a file that includes the file that does the thus guarded include. We already have some tracking of where source comes from now for the purposes of printing include backtraces... Woud probably want to re-set the usable scope if there is a later include of the same file, mutliple-include-guards notwithstanding...