Last change
on this file since c25f16b was
c715e5f,
checked in by Andrew Beach <ajbeach@…>, 2 years ago
|
Removed most of the exception macros (EHM_ group). Made changes to the exception declaration pass to do so.
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | // |
---|
2 | // Cforall Version 1.0.0 Copyright (C) 2021 University of Waterloo |
---|
3 | // |
---|
4 | // quasiKeyword.cfa -- test that quasi-keywords can be used for variable and functions names, as well as keywords in |
---|
5 | // control structures. |
---|
6 | // |
---|
7 | // Author : Peter A. Buhr |
---|
8 | // Created On : Wed Feb 17 10:33:49 2021 |
---|
9 | // Last Modified By : Peter A. Buhr |
---|
10 | // Last Modified On : Sat Jun 5 10:07:59 2021 |
---|
11 | // Update Count : 8 |
---|
12 | // |
---|
13 | |
---|
14 | exception E {}; |
---|
15 | |
---|
16 | void catch( int i ) {} |
---|
17 | void recover( int i ) {} |
---|
18 | void catchResume( int i ) {} |
---|
19 | void fixup( int i ) {} |
---|
20 | void finally( int i ) {} |
---|
21 | |
---|
22 | int main(int argc, char const *argv[]) { |
---|
23 | int catch, recover, catchResume, fixup, finally; |
---|
24 | try { |
---|
25 | catch = 3; |
---|
26 | catch( catch ); |
---|
27 | recover = 3; |
---|
28 | recover( recover ); |
---|
29 | catchResume = 3; |
---|
30 | catchResume( catchResume ); |
---|
31 | fixup = 3; |
---|
32 | fixup( fixup ); |
---|
33 | finally = 3; |
---|
34 | finally( finally ); |
---|
35 | throw (E){}; |
---|
36 | report (E){}; |
---|
37 | throwResume (E){}; |
---|
38 | } catch ( E * ) { |
---|
39 | } recover ( E * ) { // same as catch |
---|
40 | } catchResume ( E * ) { |
---|
41 | } fixup ( E * ) { // same as catchResume |
---|
42 | } finally { |
---|
43 | } |
---|
44 | |
---|
45 | if ( 3 ) |
---|
46 | try { |
---|
47 | } fixup ( E * ) { |
---|
48 | } finally { |
---|
49 | } |
---|
50 | else catch = 3; |
---|
51 | |
---|
52 | #pragma GCC warning "Compiled" // force non-empty .expect file, NO TABS!!! |
---|
53 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.