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

2013-10-23 Thread Diego Novillo
On Tue, Oct 22, 2013 at 11:09 PM, Joern Rennecke wrote: > 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 includ

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

2013-10-22 Thread Joern Rennecke
On 22 October 2013 21:07, Andrew MacLeod 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 consid

Re: [RFC] Include file structuring.

2013-10-22 Thread Andrew MacLeod
On 10/22/2013 08:27 AM, Joern Rennecke wrote: On 18 October 2013 19:16, Andrew MacLeod wrote: So I think I am in favour of no includes in .h files... It may make it more obvious when a file is using some other inappropriate file for something, and it is easier for my simple analysis tools to f

Re: [RFC] Include file structuring.

2013-10-22 Thread Joern Rennecke
On 18 October 2013 19:16, Andrew MacLeod wrote: > So I think I am in favour of no includes in .h files... It may make it more > obvious when a file is using some other inappropriate file for something, > and it is easier for my simple analysis tools to find poor export > candidates. > > I will al

Re: [RFC] Include file structuring.

2013-10-21 Thread Diego Novillo
On Fri, Oct 18, 2013 at 10:00 AM, Andrew MacLeod wrote: > The question is... Do we allow a .h file like this to be an aggregator, > meaning a file can just include tree-ssa.h and get all this, or do we push > it all down to the .c file, and actually include what each one needs. Or do > we pick a

Re: [RFC] Include file structuring.

2013-10-21 Thread Martin Jambor
Hi, On Fri, Oct 18, 2013 at 10:00:13AM -0400, Andrew MacLeod wrote: > At a minimum, I do think that if a .h file *requires* another .h > file to compile, that it should include it. Absolutely. > ie, if gimple-ssa.h is > included, it wont compile unless tree-ssa-operands.h has already > been inc

Re: [RFC] Include file structuring.

2013-10-18 Thread Andrew MacLeod
On 10/18/2013 12:55 PM, Jeff Law wrote: On 10/18/13 08:00, Andrew MacLeod wrote: The question is... Do we allow a .h file like this to be an aggregator, meaning a file can just include tree-ssa.h and get all this, or do we push it all down to the .c file, and actually include what each one nee

Re: [RFC] Include file structuring.

2013-10-18 Thread Jeff Law
On 10/18/13 08:00, Andrew MacLeod wrote: The tree-flow.h restructuring now brings us to the larger question of exactly how we want includes organized. All the remaining includes in tree-ssa.h are required by numerous other .c files. The actual number of .c files which will need to #include any g

[RFC] Include file structuring.

2013-10-18 Thread Andrew MacLeod
The tree-flow.h restructuring now brings us to the larger question of exactly how we want includes organized. All the remaining includes in tree-ssa.h are required by numerous other .c files. The actual number of .c files which will need to #include any given file is: (roughly calculated by t