Problem exceptions/threads on HP-10.20 - core dumps

Bjoern Wennberg bjornw@fairplay.no
Fri Aug 14 08:02:00 GMT 1998


Hi!

The following program core-dumps in the trow() statement.

#include <iostream>

class IOError {};
 

int
main()
{
   try {
      throw IOError();
   }
   catch (IOError &ex) {
      cout << "Caught IOError" <<
endl;
   }
   catch (...) {
      cout << "Caught all" <<
endl;
   }

}
 

I have installed  egcs-19980803 with binutils-2.9.1 and enable-haifa.
btw: I need to link in the threads libraries to compile:
g++ -fexeptions -threads test.cc
 
 
 

btw:
I needed to add the -D_CMA_NOWRAPPERS_ to the *cpp entry of my specs
file because HP's dce-threads
defines close() as cma_close() and this breaks fstreambase::close().
*cpp:
%{!mpa-risc-1-0:%{!mnosnake:%{!msoft-float:-D__hp9000s700 -D_PA_RISC1_1}}}  %{!ansi: -D_HPUX_SOURCE -D_HIUX_S\
OURCE} %{threads:-D_REENTRANT -D_DCE_THREADS -D_CMA_NOWRAPPERS_}
*lib:
%{!shared:     %{!p:       %{!pg:         %{!threads:-lc}         %{threads:-lcma -lc_r}}       %{p: -L/lib/l\
ibp/ -lc}       %{pg: -L/lib/libp/ -lc}}}


-- 
-------------------------------------------------------
Bjorn Wennberg              email: bjornw@fairplay.no 
                               ms: +47 950 82 657
Senior Programmer           phone: +47 22405538
FairPlay International AS     fax: +47 22405539
 



More information about the Gcc-bugs mailing list