This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Internal compiler error
- To: "'bug-gcc at prep dot ai dot mit dot edu'" <bug-gcc at gnu dot org>
- Subject: Internal compiler error
- From: Harlan Kassler <Harlan dot Kassler at FlukeNetworks dot com>
- Date: Thu, 24 Aug 2000 18:00:50 -0500
- Organization: Fluke Networks
I received an internal compiler error on the follow code on the "throw"
statement. The problem was easy to recognize, but I thought I would report
the bug anyhow.
In "Sample.h" I have:
#include "exception"
class a
{
class CreateError : public exception
{
public:
CreateError()
: exception() { };
virtual ~CreateError() { };
virtual const char* what() const;
};
};
class b
{
public:
void foo();
};
In "Sample.cpp" I have:
#include "Sample.h"
const char* a::CreateError::what() const
{
return "error thrown";
}
void b::foo()
{
a var1;
a *var2 = &var1;
throw var2->CreateError();
}
ENVIRONMENT:
gcc driver version cygnus-2.7.2-960126 egcs-971225 tornado 2.0 executing
gcc version cygnus-2.7.2-960126
Windows NT 4.0 SP6
ARGUMENTS:
-g -mcpu=860 -ansi -nostdinc -DRW_MULTI_THREAD -D_REENTRANT -fvolatile
-fno-builtin -I. -IC:/APPS/Tornado/target/h -IC:/APPS/Tornado/mirror_lib/h
-DCPU=PPC860 -Wall -W -Wpointer-arith -Wbad-function-cast -Wcast-align
-Wwrite-strings -Wconversion -Wstrict-prototypes -Wmissing-prototypes
-Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline
-Woverloaded-virtual
Harlan