Add missing dependency to gcc/c-common.h

Mark G. Adams mark.g.adams@sympatico.ca
Thu May 20 15:03:00 GMT 2004


On Wed, 2004-05-19 at 16:32, Zack Weinberg wrote: 
> "Mark G. Adams" <mark.g.adams@sympatico.ca> writes:
> 
> > gcc/c-common.h has an implicit dependency on gcc/tree.h which this patch
> > makes explicit.
> >
> > Bootstrapped and tested on i686-linux with no new regressions.
> >
> > gcc/ChangeLog:
> >
> > 2004-05-19 Mark G. Adams  <mark.g.adams@sympatico.ca>
> >
> > 	* c-common.h: Include tree.h
> > 	* Makefile.in: Add dependency on TREE_H to C_COMMON_H
> 
> I'm of two minds about this change.  It is correct, in the sense that
> c-common.h certainly does make reference to lots of things from
> tree.h.  However, I cannot decide whether it is appropriate to be
> doing this for tree.h or rtl.h (which are included by almost all GCC
> source files anyway).  Also, I am not exactly enthused about
> *expanding* the set of files with a direct dependency on tree.h.

So to me, the question becomes: is it possible that somebody will want
to include and use c-common.h in a (potentially new) file and they won't
already have included tree.h for some other reason?

Personally, I've always preferred to have _all_ dependencies spelt out
in each header, so that the "header user" doesn't need to worry about
any implicit requirements at all.

What is the issue with expanding the set of files directly depending on
tree.h? They were implicitly depending on it before, so I'd assume that
making the dependency explicit would be a good thing.

//Mark




More information about the Gcc-patches mailing list