[fortran,patch] Creating a common header to the front-end and runtime library

François-Xavier Coudert fxcoudert@gmail.com
Wed Aug 29 16:53:00 GMT 2007


Hi all,

[yes, another "oh I wanted to do that before stage2 closes" patch]

I suggest that we create a header file common to the front-end and
library, to easily share common information without the need to keep
information (spread over headers and source files) in sync manually.
This will have a nice impact on maintainability, with less potential
to screw things up.

Attached is my proposal for doing so. For now, I gathered constants
and enums that were clearly copy-pasted (like the CONVERT option
values, the STD integer flags, the possibles values for the -ffpe-trap
option) and things that were spread around (preconnected unit numbers
for default input, output and error).

The common header is created as libgfortran/libgfortran_frontend.h;
other naming suggestions are of course welcome. As this patch is
moving things around, the ChangeLog entries are rather tedious to
write, and I'll do it in parallel with comments/reviewing. The patch
was bootstrapped and regtested on x86_64-linux.

Since this is mostly moving things around, I'd like your comments on
whether this is something we want for gfortran; I am convinced that
it's a clear win, but please step in and give your opinion. So, if a
consensus appears [1], I'll commit the patch in a few days, taking
into account all amendments made at that point.

Thanks for taking time to answer, even if to say "don't know",
FX


[1] or if noone seems to care ;-)


:ADDPATCH fortran:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: common_header.diff
Type: application/octet-stream
Size: 70113 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20070829/9c152d23/attachment.obj>


More information about the Fortran mailing list