]>
Commit | Line | Data |
---|---|---|
6481daa9 MM |
1 | // { dg-do assemble } |
2 | // { dg-options "-fexceptions" } | |
921e5a0e JL |
3 | // GROUPS passed exceptions |
4 | // except file | |
5 | // Message-Id: <9307071456.AA05275@davinci.hio.hen.nl> | |
6 | // From: akkersdi@hio.hen.nl | |
7 | // Subject: exceptions broken | |
8 | // Date: Wed, 7 Jul 1993 16:56:52 +0200 (MET DST) | |
9 | ||
10 | class ball { | |
11 | public: int dummy; | |
12 | ball() : dummy(0) { ; } | |
13 | }; | |
14 | ||
15 | void pitcher() | |
16 | { | |
17 | throw ball(); | |
18 | } | |
19 | ||
20 | void catcher() | |
21 | { | |
22 | try // <=== gcc 2.* fails here | |
23 | { | |
24 | pitcher(); | |
25 | } | |
26 | catch (ball) { | |
27 | /* sleepy catcher doing nothing */ ; | |
28 | } | |
29 | } | |
30 | ||
31 | int main() | |
32 | { | |
33 | catcher(); | |
34 | } |