- From: Thomas Mueller <tomtom.mueller@gmx.de>
- Date: Tue, 26 Oct 2004 14:12:55 +0700
- To: "w3c-wai-rc lists.w3.org" <w3c-wai-rc@w3.org>
- Message-ID: <001701c4bb2b$5eb64d50$fb78fea9@bigmac>
DESCRIPTION: g++/c++ generates an "Internal Compiler Error 40" when compiling code which attempts a catch-by-value for exception classes derived from any base classes which have destructors. TEST CASE DESCRIPTION: The code below defines a trivial base class exception (TBaseException), and an equally trivial derived exception (TDerivedException). A routine for throwing the exceptions is defined (ThrowIt(int)), and two routines for catching the exceptions are defined (CatchByReference(int), and CatchByValue(int)). The compiler error is generated in the CatchByValue routine at the catch clause for TDerivedException. If you comment out the destructor for TBaseException the code will compile. COMPILER COMMAND LINE: c++ GCC-BUG.C -o bug -fhandle-exceptions COMPILER ERROR OUTPUT: [sparc-sun-solaris2.5.1 configuration] GCC-BUG.C: In function `void CatchByValue(int)': GCC-BUG.C:135: Internal compiler error. GCC-BUG.C:135: Please submit a full bug report COMPILER ERROR OUTPUT: [i386-unknown-bsdi2.1 configuration] GCC-BUG.C: In function `void CatchByValue(int)': GCC-BUG.C:135: Internal compiler error 40. GCC-BUG.C:135: Please submit a full bug report CONFIGURATION INFO: gcc -v output: gcc version 2.7.2.2 (both systems) configure architecture: sparc-sun-solaris2.5.1 configure architecture: i386-unknown-bsdi2.1 configure paramenters: NONE on either system COMPILER MODIFICATIONS: NONE - compilers were both built from the stock 2.7.2.2 distribution. OTHER NOTES: I usually catch exceptions by reference, but there appears to be a memory leak in g++/c++ when derived exceptions are caught this way. I discovered the internal compiler error while looking for a quick and dirty way to plug this leak. --- GoldED/386 2.42.G0614+ * Origin: Everything goes the bach runter ... * http://thaigirls4thailand.com
Received on Tuesday, 26 October 2004 07:14:48 UTC