Using, Maintaining and Enhancing COBOL for the GNU Compiler Collection (GCC)


Within the scope of the course of lectures "Programming languages and Compiler Development" at the Technischen Universit@"at Darmstadt, a compiler for a small programming language is developed. Hitherto the output of the compiler was the creation of assembler code for the Motorola 68000 microprocessor family (HP Dialect). Later also java byte codes were used as the output target language. The quality of this code was often modest because optimisation was only possible with great effort on the part of the programmer. An alternative starting point for the formation of the output of the exercise is the use of a pre-existing code generator. With the help of unified documentation, such as is placed at your disposal here, it should be easy enough to use the GCC code generator.


This chapter was originally written in German by Joachim Nadler as a Programming Languages and Compilers, Information Technologya project at the Technische Universit@"at Darmstadt under Professor Dr. H.-J. Hoffmann and Dr. J@"urgen Buchner, and was translated with some changes and additions by Tim Josling. You can reach the authors at and


A common term for procedures and functions


see files tree.h and tree.def


at the time of writing the most recent Version - the snapshot 2000/04/10


GNAT", at the time version 3.10p, described in, homepage, developed in the Information Technology department of NYU and obtainable for example from or via the `student' link on the site


`gpc', current version 2.0, developed under coordination of Jukka Virtanen, obtainable from; the project homepage for the time being is


This gives an average of 225,000 lines over 30 architectures or 7,500 lines of code per architecture


or modes, whose aim is storage management, see below


more on this later


Details on the requirements follow later


as requested by the provided command line paremeters


like `typedef' named types


why only almost? - see section section 14.3.5 Callback


see below under `poplevel'


the form { (followed by statements and declarations) }


See the explanation of pushdecl below


and is not merely local like statements, it must then just as for the keep != 0 case unconditionally create a `BLOCK'


thus a subdirectory `cp' for the language C++


meaning the directory, in which the distribution package was unpacked eg `gcc-2.7.2'


The author has always used the GNU utility; whether other linkers offer this facility I don't know, presumably though not. The GNU binder can be obtained by ftp; it is conained in the package `binutils'


for more details on `VPATH' see the documentation of GNU `make'


It is comprehensively explained in the source file `gcc.c'


often called 'pretty-printing'


which are, surprisingly, supported by the C front end


here it is understood as in C that the declarations of the local variables takes place within the body of the routine!


such as a destructor in C++


It would appear


thus not necessarily the real type, the nominal type will mostly be `integer_type_node'


`default' in C


must be a `TREE_LIST', which can be easily created from a `CHAIN' by using `listify' combined with `chainon' if needed as in the case where there are more than one parameters


Of great asssistance for the construction of this work was also the record of a presentation Kenner95a Kenner95b by Richard Kenner, who the author believes to be the unofficial leader of the GNU compiler project, at an academic conference (POPL95)


in commercial compilers this information is keenly kept secret, in order to protect themselves from undesired competition


translator's note: and also useful is the find-tag command in emacs combined with the etags utility

This document was generated on 24 January 2001 using texi2html 1.56k.