Go forward to porting to g++.
Go backward to internal compiler error.
Go up to User Problems.
I think I have found a bug in g++.
==================================
"I think I have found a bug in g++, but I'm not sure. How do I know,
and who should I tell?"
First, see the excellent section on bugs and bug reports in the gcc
manual (which is included in the gcc distribution). As a short summary
of that section: if the compiler gets a fatal signal, for any input,
it's a bug (newer versions of g++ will ask you to send in a bug report
when they detect an error in themselves). Same thing for producing
invalid assembly code.
When you report a bug, make sure to describe your platform (the type
of computer, and the version of the operating system it is running) and
the version of the compiler that you are running. See the output of the
command `g++ -v' if you aren't sure. Also provide enough code so that
the g++ maintainers can duplicate your bug. Remember that the
maintainers won't have your header files; one possibility is to send
the output of the preprocessor (use `g++ -E' to get this). This is
what a "complete bug report" means.
I will add some extra notes that are C++-specific, since the notes
from the gcc documentation are generally C-specific.
First, mail your bug report to "bug-g++@prep.ai.mit.edu". You may
also post to `gnu.g++.bug', but it's better to use mail, particularly
if you have any doubt as to whether your news software generates
correct reply addresses. Don't mail C++ bugs to
bug-gcc@prep.ai.mit.edu.
*News:* as I write this (late February 1996) the gateway connecting
the bug-g++ mailing list and the `gnu.g++.bug' newsgroup is
(temporarily?) broken. Please mail, do not post bug reports.
If your bug involves libg++ rather than the compiler, mail to
bug-lib-g++@prep.ai.mit.edu. If you're not sure, choose one, and if you
guessed wrong, the maintainers will forward it to the other list.
Second, if your program does one thing, and you think it should do
something else, it is best to consult a good reference if in doubt.
The standard reference is the draft working paper from the ANSI/ISO C++
standardization committee, which you can get on the net. For
PostScript and PDF (Adobe Acrobat) versions, see the archive at
`ftp://research.att.com/dist/stdc++/WP'. For HTML and ASCII versions,
see `ftp://ftp.cygnus.com/pub/g++'. On the World Wide Web, see
`http://www.cygnus.com/misc/wp/'.
An older standard reference is "The Annotated C++ Reference Manual",
by Ellis and Stroustrup (copyright 1990, ISBN #0-201-51459-1). This is
what they're talking about on the net when they refer to "the ARM".
But you should know that changes have been made to the language since
then.
The ANSI/ISO C++ standards committee have adopted some changes to the
C++ language since the publication of the original ARM, and newer
versions of g++ (2.5.x and later) support some of these changes, notably
the mutable keyword (added in 2.5.0), the bool type (added in 2.6.0),
and changes in the scope of variables defined in for statements (added
in 2.7.0). You can obtain an addendum to the ARM explaining many of
these changes by FTP from
`ftp://ftp.std.com/AW/stroustrup2e/new_iso.ps'.
Note that the behavior of (any version of) AT&T's "cfront" compiler
is NOT the standard for the language.