8sa1-gcc/gcc/testsuite/g++.old-deja/g++.law/except4.C
Jeff Law 921e5a0eb4 Initial revision
From-SVN: r14840
1997-08-19 01:34:40 -06:00

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();
}