Flatten function.h

Andrew MacLeod amacleod@redhat.com
Tue Sep 16 21:23:00 GMT 2014


On 09/16/2014 05:12 PM, Joseph S. Myers wrote:
> On Tue, 16 Sep 2014, Andrew MacLeod wrote:
>
>> I did an include file reduction on all the language/*.[ch] and core *.[ch]
>> files, but left the target files with the full complement of 7 includes that
>> function.h use to have.  Its probably easier when this is all done to fully
>> reduce the targets one at a time... there are so many nooks and crannies I
>> figured I'd bust something right now if i tried to do all the targets as well
>> :-)
> How did you determine what includes to remove?  You appear to have removed
> tm.h includes from various files that do in fact use target macros; maybe
> they get it indirectly included by some other header, but I thought a
> principle of this flattening was to avoid relying on such indirect
> inclusions.  Because of possible use of target macros in #ifdef
> conditionals, "compiles with the include removed" is not a sufficient
> condition for removing it.
>
> cfgrtl.c
> gimple-fold.c
> mode-switching.c
> tree-inline.c
> vmsdbgout.c
> fortran/f95-lang.c
> fortran/trans-decl.c
> objc/objc-act.c
>
Many of those files do in fact get numerous include files from expr.h, 
which are likely to get put back in when expr.h is flattened,  but there 
is a risk as you point out.

Perhaps I should proceed by simply moving the includes and removing any 
duplicate includes,  leaving the reduction for later date. There is less 
chance of that causing issues.  I did forget about the discussion last 
year concerning target macros from the RTL end of things... My mind is 
slowly going :-).



Andrew





More information about the Gcc-patches mailing list