This is the file README.  It documents release 1.21.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.

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.21, 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.
Currently, the debugger supports all of the features of the compiler,
except for: operator overloading, 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 developed on a SUN-3 workstation, running Sun's OS 3.5
(Berkeley 4.2 compatible with some System V enhancements).  If you
have a different machine, you may experience installation difficulties
due to conditions which I cannot anticipate.  I will endeavor to fix
problems related to foreign machines as quickly as possible.  One
current deficiency is that procedure integration is not yet finished
for the VAX: it only works in conjunction with -O.

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.21/
	gcc/	linked to ->	gcc-1.21
	gcc-test/

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

	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

	dist-g++/
	dist-gdb+/

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

	dist-libg++/

The code for GNU C++ is in the directory dist-g++/, and the code for
making GDB+ is in the directory dist-gdb+/.  Make a directory g++/.
Make symbolic links between all the files in dist-g++ and g++.  Then,
make symbolic links between all .y, .c, .h, and .def files from
../gcc, as well as the file ../gcc/move-if-change. (It is presumed
that ../gcc is the directory containing version 1.21 of the GNU CC
compiler.  The error messages about links that could not be made
should be ignored.  You must also make links from the
machine-dependent files of GNU CC for GNU C++.  For example, on a Sun,
you would enter:

	install% ln -s ../gcc/tm-sun3.h tm.h
	install% ln -s ../gcc/m68k.md md
	install% ln -s ../gcc/output-m68k.c aux-output.c

Now, Change your current working directory to g++/ .

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.

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++/src/ will tell you what to do), you can verify that GNU
C++ has been properly installed.

Installation of GDB+.

The process for making GDB+ is similar.  Note: If you are not on a SUN
or a VAX, the debugger may not work for you. GDB+ shares many files
with GDB.  However, rather than share files with GDB, GDB+ is
distributed as a complete, self-contained release.  This is because a
complete GDB+ is not that big, and it is much more conveninent not to
require links to GDB in the Emacs distribution.  To make GDB+, make a
directory gdb+/.  Make symbolic links between all of the files in
dist-gdb+ and gdb+.  Change your current working directory to gdb+/ .
Then, just type `make'.  If the program links successfully, try
debugging the a.out file in the g++/ directory.  If you can set a
breakpoint at `main', and stop there when the program executes, then
you have succeeded in making 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.  Changes to files like `decl.c' tend to have a
greater impact on the maintenance of GNU C++.

Have fun!

Michael Tiemann

5/1/88

For more information.

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

	Michael Tiemann
	c/o MCC
	3500 West Balcones Center Drive
	Austin, TX
	78759

	Phone: (512) 338 - 3761
	ARPA Email: tiemann@mcc.com

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.
