Next: porting to g++ Prev: overloaded increment and decrement Up: User Problems Top: Top

3.6. 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. Also provide enough code so that the g++ maintainers can duplicate your bug.

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.

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 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''.

The reference manual, without annotations, also appears in Stroustrup's "The C++ Programming Language, Second Edition" (copyright 1991, ISBN #0-201-53992-6). Both books are published by Addison-Wesley.

Note that the behavior of (any version of) AT&T's "cfront" compiler is NOT the standard for the language.