Internal Compiler Error on "throw NULL;"
Alexandre Oliva
oliva@dcc.unicamp.br
Tue Aug 25 16:12:00 GMT 1998
Michal Ostrowski <mostrows@styx.uwaterloo.ca> writes:
> [eramosa:emu]# g++ -v
> Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.90.27/specs
> gcc version egcs-2.90.27 980315 (egcs-1.0.2 release)
> [eramosa:emu]# g++ -c bug.cc
> bug.cc: In function `const class type_info & __tf?()':
> bug.cc:8: Internal compiler error 252.
> bug.cc:8: Please submit a full bug report to `egcs-bugs@cygnus.com'.
> #include <stddef.h>
> int main(){ try{ throw NULL; } catch(char*){ } }
The latest snapshot of egcs will just print:
test.cc: In function `int main()':
test.cc:4: warning: throwing NULL
At run-time, since NULL is not a char*, the exception will not be
caught, so terminate() will call abort()
--
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil
More information about the Gcc-bugs
mailing list