Internal compiler error 252.
Mike Danylchuk
miked@mpath.com
Thu Jun 3 16:27:00 GMT 1999
The following code causes internal compiler error 252 in egcs-1.1.2 and in
the gcc-2.95 development snapshot from May 24th:
typedef char TCHAR;
void main()
{
try {}
catch( TCHAR* Err ) {}
}
You can avoid the error by using catch( char* Err ) or typedef char*
TCHAR_PTR; ... catch( TCHAR_PTR Err ).
I've included the details from egcs-1.1.2 below.
- Mike Danylchuk
miked@mpath.com
test.ii file:
-------------
# 1 "test.cpp"
typedef char TCHAR;
void main()
{
try {}
catch( TCHAR* Err ) {}
}
command line:
-------------
g++ -v -save-temps test.cpp
output:
-------
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
/usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/cpp -lang-c++ -v -undef
-D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=91 -D__ELF__
-Dunix -Di386 -D__i386__ -Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__i386__
-D__linux__ -D__unix -D__i386 -D__linux -Asystem(posix) -D__EXCEPTIONS
-Asystem(unix) -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__
test.cpp test.ii
GNU CPP version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release) (i386
Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
/usr/include/g++-2
/usr/local/include
/usr/i386-redhat-linux/include
/usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/include
/usr/include
End of search list.
/usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/cc1plus test.ii -quiet
-dumpbase test.cc -version -o test.s
GNU C++ version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
(i386-redhat-linux) compiled by GNU C version egcs-2.91.66 19990314/Linux
(egcs-1.1.2 release).
test.cpp: In function `const class type_info & __tfc()':
test.cpp:7: Internal compiler error 252.
test.cpp:7: Please submit a full bug report to `egcs-bugs@egcs.cygnus.com'.
test.cpp:7: See <URL: http://egcs.cygnus.com/faq.html#bugreport > for details.
More information about the Gcc-bugs
mailing list