921e5a0eb4
From-SVN: r14840
35 lines
520 B
C
35 lines
520 B
C
// Build don't link:
|
|
// Special g++ Options: -fexceptions
|
|
// GROUPS passed exceptions
|
|
// except file
|
|
// Message-Id: <9307071456.AA05275@davinci.hio.hen.nl>
|
|
// From: akkersdi@hio.hen.nl
|
|
// Subject: exceptions broken
|
|
// Date: Wed, 7 Jul 1993 16:56:52 +0200 (MET DST)
|
|
|
|
class ball {
|
|
public: int dummy;
|
|
ball() : dummy(0) { ; }
|
|
};
|
|
|
|
void pitcher()
|
|
{
|
|
throw ball();
|
|
}
|
|
|
|
void catcher()
|
|
{
|
|
try // <=== gcc 2.* fails here
|
|
{
|
|
pitcher();
|
|
}
|
|
catch (ball) {
|
|
/* sleepy catcher doing nothing */ ;
|
|
}
|
|
}
|
|
|
|
int main()
|
|
{
|
|
catcher();
|
|
}
|