This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Bug report
- To: "'bug-gcc at gnu dot org'" <bug-gcc at gnu dot org>
- Subject: Bug report
- From: Martin Hansen <mah at systematic dot dk>
- Date: Tue, 24 Aug 1999 11:03:16 +0200
- >Received: from exchange.systematic.dk by systematic.dk (4.1/SMI-4.1)id AA24518; Tue, 24 Aug 99 11:01:20 +0200
Hi there,
I known the following is not supposed to work, but still it shouldn't
generate
an internal compiler error either.
Compiler the following program with option -fno-rtti:
test.cpp:
#include <typeinfo>
class A {
public:
const char *kind();
};
const char *A::kind()
{
return typeid(A).name();
}
Command line:
% uname -a
HP-UX hp10 B.10.01 A 9000/710 2000178706 two-user license
% /pack/gcc-2.95.1/bin/g++ -v
Reading specs from
/pack/gcc-2.95.1/lib/gcc-lib/hppa1.1-hp-hpux10.01/2.95.1/specs
gcc version 2.95.1 19990816 (release)
% /pack/gcc-2.95.1/bin/g++ -fno-rtti -c test.cpp
test.cpp: In method `const char * A::kind()':
test.cpp:10: Internal compiler error.
test.cpp:10: Please submit a full bug report.
test.cpp:10: See <URL:http://www.gnu.org/software/gcc/faq.html#bugreport>
for instructions.
Regards,
Martin Hansen