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

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.27/
	gcc/	linked to ->	gcc-1.27
	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

	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 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 dist-g++/, and the code for
making GDB+ is in the directory dist-gdb+/.  Here is how to install
GNU C++:

(1) Make a directory g++/ and fo into it

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

(2) Make symbolic links between all the files in dist-g++ and g++.

	install% ln -s ../dist-g++/* .

(3) 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.27 of the GNU CC
    compiler.

	install% ln -s ../gcc/*.[chy] .
	install% ln -s ../gcc/*.def .
	install% ln -s ../gcc/*.md .
	install% ln -s ../gcc/move-if-change .

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 Sun3, 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++/ .

	install% cd 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+.

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 a simple file you might create, compile, and link 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

6/11/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
	INRIA
	c/o Marc Shapiro
	B.P. 10505
	78153 Le Chesnay
	C'edex, FRANCE

	Phone: +33 (1) 39-63-53-25
	ARPA Email: tiemann@wheaties.ai.mit.edu (will forward to INRIA).

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.
