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