This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Include file visibility scopes? (Was: Re: [RFC] Include file structuring.)


On 22 October 2013 21:07, Andrew MacLeod <amacleod@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...


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]