ADTast-experimentalenumpthread-emulationqualifiedEnum
Last change
on this file since 0db48ca was
53692b3,
checked in by Peter A. Buhr <pabuhr@…>, 4 years ago
|
second attempt to fix compile-only pragma message that gcc-10/11 quote
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Rev | Line | |
---|
[07c77ce] | 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 |
---|
[53692b3] | 10 | // Last Modified On : Sat Jun 5 10:07:59 2021 |
---|
| 11 | // Update Count : 8 |
---|
[07c77ce] | 12 | // |
---|
| 13 | |
---|
| 14 | #include <exception.hfa> |
---|
| 15 | |
---|
[ecfd758] | 16 | EHM_EXCEPTION( E )(); |
---|
[07c77ce] | 17 | |
---|
| 18 | void catch( int i ) {} |
---|
| 19 | void recover( int i ) {} |
---|
| 20 | void catchResume( int i ) {} |
---|
| 21 | void fixup( int i ) {} |
---|
| 22 | void finally( int i ) {} |
---|
| 23 | |
---|
| 24 | int main(int argc, char const *argv[]) { |
---|
| 25 | int catch, recover, catchResume, fixup, finally; |
---|
| 26 | try { |
---|
| 27 | catch = 3; |
---|
| 28 | catch( catch ); |
---|
| 29 | recover = 3; |
---|
| 30 | recover( recover ); |
---|
| 31 | catchResume = 3; |
---|
| 32 | catchResume( catchResume ); |
---|
| 33 | fixup = 3; |
---|
| 34 | fixup( fixup ); |
---|
| 35 | finally = 3; |
---|
| 36 | finally( finally ); |
---|
| 37 | throw (E){}; |
---|
| 38 | report (E){}; |
---|
| 39 | throwResume (E){}; |
---|
| 40 | } catch ( E * ) { |
---|
| 41 | } recover ( E * ) { // same as catch |
---|
| 42 | } catchResume ( E * ) { |
---|
| 43 | } fixup ( E * ) { // same as catchResume |
---|
| 44 | } finally { |
---|
| 45 | } |
---|
| 46 | |
---|
| 47 | if ( 3 ) |
---|
| 48 | try { |
---|
| 49 | } fixup ( E * ) { |
---|
| 50 | } finally { |
---|
| 51 | } |
---|
| 52 | else catch = 3; |
---|
| 53 | |
---|
[53692b3] | 54 | #pragma GCC warning "Compiled" // force non-empty .expect file, NO TABS!!! |
---|
[07c77ce] | 55 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.