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]

Re: [RFC] Thoughts on reordering the source tree


On Fri, May 1, 2009 at 3:54 PM, Joseph S. Myers <joseph@codesourcery.com> wrote:
> On Fri, 1 May 2009, Joseph S. Myers wrote:
>
>> On Fri, 1 May 2009, Steven Bosscher wrote:
>>
>> > - c-* go to gcc/c (including c-common.*, 29 files)
>>
>> I still suggest using a separate c-family/ directory for those files also
>> shared with C++. ?There are some cleanups that need doing of files that
>> include C headers that shouldn't, and of c-family files that include
>> C-specific headers but should just include c-family headers.
>
> Specifically, these are the problem inclusions from files that are not C
> family at all (inclusions from config/*/*-c.c - C-specific target files -
> are OK, inclusions from other target files are not; also note that
> stub-objc.c is a C file although not called c-*):
>
> attribs.c:#include "c-common.h"
> cgraphunit.c:#include "c-common.h"
> ipa-pure-const.c:#include "c-common.h"
> ipa-reference.c:#include "c-common.h"
> ipa-struct-reorg.c:#include "c-tree.h"
> ipa-struct-reorg.c:#include "c-common.h"
> ipa-type-escape.c:#include "c-common.h"
> ipa-utils.c:#include "c-common.h"
> matrix-reorg.c:#include "c-tree.h"
> matrix-reorg.c:#include "c-common.h"
> stub-objc.c:#include "c-common.h"
> tree-if-conv.c:#include "c-common.h"
> tree-nomudflap.c:#include "c-tree.h"
> tree-nomudflap.c:#include "c-common.h"
> tree-ssa-structalias.c:#include "c-common.h"
> tree-ssa-structalias.c:#include "c-tree.h"
> varasm.c:#include "c-pragma.h"
> config/h8300/h8300.c:#include "c-pragma.h"
> config/i386/i386.c:#include "c-common.h"
> config/sh/sh.c:#include "c-pragma.h"
> config/spu/spu.c:#include "c-common.h"

Eh, ouch.

I'll see if I can clean this up.  I don't believe for 90% of these
files that they should include c-common.h / c-tree.h.  Looks like
history and the usual carelessness when adding #include lines to new
files/passes.

Ciao!
Steven


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