summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.law/except4.C
blob: 95746b10b39538513fa00eddfdf653e5b652effb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// { dg-do assemble  }
// { dg-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();
}