This is the file README.  It documents release 1.35.0 of the GNU C++
compiler system, still in test release status.  All bugs reported for
previous test releases have been fixed.  Some bugs surely remain.
To see the list of current issues/bugs in GNU C++, look at the file
dist-g++/ideas, or see the BugList section of the GNU C++ Users Guide.

See the file HINTS for special clues relating to GNU C++ configuration
and troubleshooting.

Introduction.

GNU C++ is GNU CC, with a C++ front end.  GNU CC is the Free Software
Foundation's optimizing, retargetable, ANSI C compiler.  GNU CC has
source level debugging support from the GDB debugger (also available
from the Free Software Foundation).  For more information about GNU
CC, write to the Free Software Foundation at the address given below.
GNU C++ is an extension of GNU CC.  It keeps the powerful optimizer,
and maintains a high degree of source-level debugging support, while
providing the object-oriented features of C++.  Numerous files have
been added, changed, and hacked without mercy from their original GNU
CC incarnation to make this compiler accept a reasonable super/subset
of C++.

*Disclaimer*: GNU C++ is not perfectly compatible with AT&T
C++.  It is, however, a reasonably faithful implementation of C++ as
described in the C++ reference manual.  To make GNU C++ more mobile,
only the files that are not shared with GNU CC are currently being
distributed.  If you do not have GNU CC yet, or your version is older
than 1.35, you should take care of getting that first.  GNU CC is
available to sites which have anonymous ftp capability to
prep.ai.mit.edu.  Contact the Free Software Foundation for more
information.

GNU C++ is still under development, but has stabilized (hopefully) to
the point where bug fixes will not require major implementation or
reimplementation.  The purpose of this distribution is to give
interested parties a chance to start working with a free C++ compiler.
It is expected (and hoped) that this compiler will continue to evolve
at a fairly rapid pace.  I am hoping to receive not just bug reports,
but also code contributions, new features, and anything else that
makes GNU C++ a better compiler.

Documentation for GNU C++ does not really exist.  If you would like to
write some, more power to you.  What does exist is in the file
dist-g++/g++.texinfo .

GNU C++ is also distributed with GDB+.  GDB+ is an extension to GDB
which permits basic source-level debugging of GNU C++ programs.
GDB version 3.1+ has all of the support needed to debug GNU C++
programs.  When GDB 3.2 is released, it will have these capabilities,
and there will be no need to continue with a GDB 3.1+ development
track.

Currently, the debugger supports all of the features of the compiler,
except for: new and delete, operator forms of new and delete, and user
defined type conversion.  The reason for these exceptions is the
degree of difficulty of their implementation.  I am waiting until I
see a clean, general way of doing it.  Until then, I would appreciate
any input (thoughts, caveats, source code) you would like to provide.

GNU C++ was originally developed on a Sun-3 workstation, running Sun's
OS 3.5, and was migrated to a Sun-4 workstation, running Sun's OS 4.0
(Berkeley 4.2 compatible with some System V enhancements).  The GNU
C++ library is being developed on a VAX 11/750 running BSD 4.3.  If
you have machines other than these, or any kind of machine running
System V, you may experience installation difficulties due to
conditions which I cannot anticipate.  I will try to help you with
problems on these machines, but my primary goal is supporting GNU C++,
and not System V (or VMS).

Installation of GNU C++. (From distribution tape)

Select the directory in your file system where GNU code usually goes.
If this is your first GNU code, then you have probably not installed
GNU CC.  Please install it, and then continue with these instructions.
In this directory, you should have the subdirectories

	gcc-1.35/
	gcc/	linked to ->	gcc-1.35
	gcc-test/

and possibly others.  Unload the tape by using the tar command.

	install% tar xvf TARFILE

where TARFILE is either the name of a tar file if you got the
distribution via ftp, or is the name of the tape device on which the
release tape is held.

Your directory tree should now contain the additional files

	g++-1.35.0/
	gdb-3.1.2/

If you have specifically requested that the GNU C++ library be
included on the tape that we make for you, you will also have the
directory

	libg++-1.35.0/

If you got this tar file electronically instead of by tape, these
directories will come from separate tar files.

The GNU C++ library contains header files such as `stdio.h',
`stream.h', etc., which are useful when trying examples from the book.
It also contains a number of useful classes which serve both as
function program units, as well as example C++ code.

The code for GNU C++ is in the directory g++-1.35.0/, and the code for
making GDB+ is in the directory gdb-3.1.2/.  Here is how to install
GNU C++:

(1) Make a directory, e.g. g++/ and cd into it

	install% mkdir g++
	install% cd g++

(2) Make symbolic links from all files in the g++-1.35.0 directory
    to the current g++ directory, i.e., ln -s ../g++-1.35.0/* .

(3) Do a make of the "maketest" target in the Makefile.  If your directory 
    structure is as described here, you need not give any additional arguments.
    Otherwise, you must set DIR to the directory which contains GNU CC
    sources, and TDIR to the directory which contains GNU CC object
    files.

The error messages about links that could not be made should be
ignored.

(4) Configure the compiler for the machine target you want.  This is
    accomplished by running the program "config.g++".  For example, on
    a Sun4 running SunOS 4.0, you would type:

	install% config.g++ sun4-os4

Now, You should still be in the directory g++/:

	install% pwd
	install% ./g++

*Very Important*: Because GNU C++ now uses its own crt0.c, borrowed
and modified from GNU Emacs, you should verify that the crt0.c
provided is fed suitable definitions for correct compilation.  If you
have GNU Emacs, and you are not compiling to a SUN, consult your local
GNU Emacs guru, to see what sort of #defines are required for proper
operation.  Then, just type `make'.  If you are not using a SUN, you
will need to use the appropriate machine dependent files, as per GNU
CC.  If you do not provide a proper crt0.c, any executable produced
by GNU C++ may fail to run at all.  Conversely, if you have a program
which does not make it as far as the first line in main (), you have
probably failed to provide the correct flags to crt0.c.

You have now just made GNU C++.  Having done that, you should now
proceed to use GNU C++ to build the GNU C++ run-time libraries, which
are in the directory dist-libg++/ .  This code was contributed
by Doug Lea, and implements streams, obstacks, structured files, and
other C++ public service objects.  The README in that directory
explains the installation procedure for that code.  Also, by making
the library and running the test programs (the Makefile in
dist-libg++/ will tell you what to do), you can verify that GNU
C++ has been properly installed.

Installation of GDB.

Read installation instructions provided in dist-gdb.

Suggestions.

I suggest making all of the files in ../gcc/ read-only, so that when
you are making modifications to files of GNU C++, you will notice when
new ground is being broken.  It also helps to know what files can be
updated from the standard GNU software without impacting GNU C++.  For
example, if there is a bug fix for the file `cse.c', that same fix
applies to GNU CC and GNU C++.  With both compilers pointing to the
same directory via symbolic links, one need not concern oneself
with those changes.

Have fun!

Michael Tiemann

5/14/89

For more information.

GNU C++ is not yet being distributed by the Free Software Foundation.
For questions, please contact Michael Tiemann directly:

	Michael Tiemann
	Box #629
	Stanford University
	Stanford California
	94305

	Phone: (415) 323-7627
	ARPA Email: tiemann@yahi.stanford.edu
		    tiemann@wheaties.ai.mit.edu (will forward to Stanford).

For questions concerning GNU CC and GDB, the Free Software Foundation
maintains the following address:

	The Free Software Foundation
	675 Massachusetts Avenue
	Cambridge, Mass
	02139

	Phone: (617) 876 - 3296

Software from the Free Software Foundation is provided with absolutely
no warranty, to the extent permitted by applicable state law.
Redistribution of its code (source and/or executable) by MCC does not
imply that MCC offers a warranty for such code.
