[Patch, Fortran] Minor include-file cleanup

Tobias Burnus burnus@net-b.de
Sun May 23 16:02:00 GMT 2010


This patch does a minor cleanup:

a) Do not include toplev.h in openmp.c,  trans-stmt.c and primary.c
(As its declarations are unused.)

b) gfortran.h: Do not include system.h and add it to the few remaining
files explicitly (bbt.c, data.c, dependency.c, dump-parse-tree.c).
This is kind  of a no op, except that one does not include the file
twice - explicitly in *.c and implicitly through gfortran.h. (If one
wants to keep it only in gfortran.h, one needs to move its inclusion up
in some files as other included .h files already need the declarations
of system.h.)

c) Do not include gfortran.h and/or splay-tree.h in arith.h,
constructor.h, match.h, parse.h, target-memory.h.
Also kind of a no op: All *.c files include gfortran.h and (if needed)
splay-tree.h explicitly, thus one does not need to add them additionally
through .h files.

d) Annotate why toplev.h is still needed (several *.c)
The reason is mostly because of sorry and fatal_error.

Build on x86-64-linux.
OK for the trunk?

Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: include-cleanup2.diff
Type: text/x-patch
Size: 10215 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20100523/dd34853e/attachment.bin>


More information about the Gcc-patches mailing list