This is the mail archive of the gcc-patches@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: [PATCH] Fix missing headers for plugin [was Miss head file diagnostic.h in plugin.h?]


On Tue, 30 Nov 2010, Mingjie Xing wrote:

> Hi Ralf, further digging shows that there are many places where
> hard-reg-set.h and $(FUNCTION_H) both appear.  For an example,
> 
> graph.o: graph.c $(SYSTEM_H) coretypes.h $(TM_H) $(TOPLEV_H)
> $(DIAGNOSTIC_CORE_H) $(FLAGS_H) output.h \
>     $(RTL_H) $(FUNCTION_H) hard-reg-set.h $(BASIC_BLOCK_H) graph.h
> $(OBSTACK_H) \
>     $(CONFIG_H) $(EMIT_RTL_H)
> 
> Do you think that after put hard-reg-set.h in FUNCTION_H, these will
> need more cleanup?

No.  If a file directly includes hard-reg-set.h then it is correct that 
hard-reg-set.h be listed explicitly in its dependencies, whether or not it 
also indirectly includes hard-reg-set.h.  And if a file uses interfaces 
from hard-reg-set.h it is correct that it includes it explicitly rather 
than relying on another header happening to include it indirectly.

These dependencies don't tend to be kept up to date very reliably, 
however.  Since there is now a GNU make 3.82 release, I wonder if for 4.7 
we could remove the manually maintained dependencies and arrange things so 
that with GNU make 3.82 or later you get automatic dependency generation 
(see Tom's patch that had to be reverted a while back because of bugs in 
older GNU make releases) and with older GNU make you get a safe but stupid 
dependency of all .o files on all headers?

-- 
Joseph S. Myers
joseph@codesourcery.com


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