This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
G++ internal compiler error for `struct A { ~A(); }; A::~A(int) {}'
- To: egcs-bugs at cygnus dot com
- Subject: G++ internal compiler error for `struct A { ~A(); }; A::~A(int) {}'
- From: Raja R Harinath <harinath at cs dot umn dot edu>
- Date: 31 Jul 1998 15:36:37 -0500
Hi,
Compiling
struct A
{
~A();
};
A::~A(int)
{
}
with g++ gives the following message:
$ c++ -c prune.cc
prune.cc: In method `A::~A()':
prune.cc:7: Internal compiler error.
prune.cc:7: Please submit a full bug report to `egcs-bugs@cygnus.com'.
$ c++ -v
Reading specs from .../lib/gcc-lib/sparc-sun-solaris2.5/egcs-2.92.00/specs
gcc version egcs-2.92.00 19980730 (gcc2 ss-980609 experimental)
A variant
struct A
{
~A();
};
A::~A(int, int)
{
}
produces a slightly different message:
$ c++ -c prune1.cc
prune1.cc:6: Internal compiler error 892.
^^^^^
prune1.cc:6: Please submit a full bug report to `egcs-bugs@cygnus.com'.
This message was generated with `my_friendly_abort(892);', not a core
dump.
The fun part is g++ 2.7.2 accepts, and compiles, the above without any
error.
Case 2 was distilled from code in the `word2x' program, found in CTAN
(the Comprehensive TeX Archive Network). Case 2 was further distilled
to get Case 1.
- Hari
--
Raja R Harinath ------------------------------ harinath@cs.umn.edu
"When all else fails, read the instructions." -- Cahn's Axiom
"Our policy is, when in doubt, do the right thing." -- Roy L Ash