This is the mail archive of the gcc@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]

Re: Integrating a new front end


> Hello,
> 
> I'm trying to figure out how to integrate a new front end in GCC for the GNU 
> Fortran 95 project. Not that it's ready yet :-) but I'm trying to figure out 
> what it takes to create the interface between the g95 parser and the GCC back 
> end.
Please if you will start work on f95 frontend, try to use trees and function at
time, so do not get too much inspiration from f77 backend, instead study the C
and C++.

The function at time scheme is truly important now, as on ast branch there are
number of highlevel optimizers in development and if your fronetnd will not
use them it will produce worse code.
> 
> I first had a look at the COBOL for GNU manual (section 14.4), and it 
> describes a lang-specs.h. I recall seeing such a file in my old gcc source 
> tree, but in the 3.0.x source tree I checked out from CVS last week, there is 
> no such file.
> 
> I grepped in the source in gcc/gcc and found this:
> gcc.c:  {".f", "#Fortran", 0}, {".for", "#Fortran", 0}, {".fpp", "#Fortran", 
> 0},

This is entry for the gcc driver to figure out proper file type from the
extension.
> 
> Am I correct that this info used to be in lang-specs.h, but that it should be 
> in gcc.c for GCC 3.x? Is there anything else I should know about?

They only way is probably take a look at the existing frontends.  There has
been number of changes, as the hooks (macros) used by fronends are turned
into entries of structure to allow more flexibility. See langhooks.h
 
I am not very experienced in frontend, so I will let others to write more.

Good luck with important project!
Honza
> 
> Greetz
> Steven
> s.bosscher@student.tudelft.nl


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