This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] Thoughts on reordering the source tree
On Fri, 1 May 2009, Steven Bosscher wrote:
> 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.
Thanks! I agree most of the cleanup should be straighforward; the files
can't actually be using any *functions* that are C-specific or the non-C
compilers wouldn't link. (The c-tree.h inclusions in c-family files may
be for functions both C and C++ define; in such cases, the prototypes
should move to a shared header.) But putting files in separate
directories and making sure the build rules do not include
-Isrcdir/c-family for non-C-family code should help ensure we don't get
such includes appearing in future, and so better control over the
interface between different parts of the compiler.
--
Joseph S. Myers
joseph@codesourcery.com