GCC 3.3 exception problem
Eric Botcazou
ebotcazou@libertysurf.fr
Fri Jun 6 11:16:00 GMT 2003
> I have just download and built GCC 3.3 and C++ exceptions are causing
> problems. Whenever I throw and exception my program aborts and dumps core.
>
> The following program is an example.
>
> #include <iostream>
>
> int main()
> {
> try
> {
> throw 5;
> }
> catch(int i)
> {
> std::cerr << i << std::endl;
> }
> catch(...)
> {
> std::cerr << "unknown" << std::endl;
> }
>
> return 0;
> }
I can't reproduce with your testcase.
> Here is the configuration of gcc.
>
> geh@lightning:~> gcc-3.3 -v
> Reading specs from
> /export/development/gcc-3.3/lib/gcc-lib/sparc-sun-solaris2.6/3.3/specs
> Configured with: ../gcc-3.3/configure --prefix=/export/development/gcc-3.3
> --program-suffix=-3.3 --disable-shared --enable-threads
> --enable-languages=c,c++ --with-ld=/usr/local/bin/ld --with-gnu-ld
> Thread model: posix
> gcc version 3.3
Same configuration here, except for the linker which is the Sun linker.
Could you run 'ldd' on your testcase executable? Do you have a 3.2.x version
installed on the same machine?
--
Eric Botcazou
More information about the Gcc
mailing list