This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Bug report


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]