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


On Sun, Nov 11, 2001 at 01:58:54AM +0100, Steven Bosscher wrote:
> 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.
> 
> 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.

Did you look in the language subdirectories?  There isn't a
lang-specs.h for the C compiler, but there is for all the others.

~/src/gcc/vanilla/gcc $ ls */lang-specs.h
ada/lang-specs.h  cp/lang-specs.h  java/lang-specs.h
ch/lang-specs.h   f/lang-specs.h   objc/lang-specs.h

> 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?

It's just the tip of the iceberg...  The COBOL for GNU manual is out
of date and inaccurate in a lot of its advice.  I'd suggest that
instead you get your hands on the "treelang" front end and look at
what it does.

You should also, as Jan suggested, look at the way the C-family
compilers generate trees for an entire function.  This is the way of
the future.

Do *not* look at the existing G77 front end.  It is written in an, um,
idiosyncratic style which will only confuse you, and is not up to date
on recommended practice.

zw


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