Last change
on this file since 7d30a1e was 2853d6f, checked in by Michael Brooks <mlbrooks@…>, 9 months ago |
Remove uses of warnings to show test success. Eliminate simple causes of other warnings from affected tests and remove the result from WFLAG_OPT_LAX.
Many affected tests also formerly used -fsyntax-only to avoid errors at later compilation stages, or at runtime. Repair such tests to actually work though runtime, and remove them from SYNTAX_ONLY_CODE.
Group tests listed under WFLAGS_OPT according to why they should receive lax treatment. Add reason WFLGAS_OPT_LAX_EXPECT_WARN and give the original list reason WFLGAS_OPT_LAX_TO_INVESTIGATE.
Tests whose purpose is to show a warning are listed as both SYNTAX_ONLY_CODE (so that the warning is the output) and WFLGAS_OPT_LAX_EXPECT_WARN (to document this fact).
|
-
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 | vtable(E) E_vt;
|
---|
16 |
|
---|
17 | void catch( int i ) { (void) i; }
|
---|
18 | void recover( int i ) { (void) i; }
|
---|
19 | void catchResume( int i ) { (void) i; }
|
---|
20 | void fixup( int i ) { (void) i; }
|
---|
21 | void finally( int i ) { (void) i; }
|
---|
22 |
|
---|
23 | int main() {
|
---|
24 | int catch, recover, catchResume, fixup, finally;
|
---|
25 | try {
|
---|
26 | catch = 3;
|
---|
27 | catch( catch );
|
---|
28 | recover = 3;
|
---|
29 | recover( recover );
|
---|
30 | catchResume = 3;
|
---|
31 | catchResume( catchResume );
|
---|
32 | fixup = 3;
|
---|
33 | fixup( fixup );
|
---|
34 | finally = 3;
|
---|
35 | finally( finally );
|
---|
36 | throw (E){ & E_vt };
|
---|
37 | report (E){ & E_vt };
|
---|
38 | throwResume (E){ & E_vt };
|
---|
39 | } catch ( E * ) {
|
---|
40 | } recover ( E * ) { // same as catch
|
---|
41 | } catchResume ( E * ) {
|
---|
42 | } fixup ( E * ) { // same as catchResume
|
---|
43 | } finally {
|
---|
44 | }
|
---|
45 |
|
---|
46 | if ( 3 )
|
---|
47 | try {
|
---|
48 | } fixup ( E * ) {
|
---|
49 | } finally {
|
---|
50 | }
|
---|
51 | else catch = 3;
|
---|
52 |
|
---|
53 | printf("done\n");
|
---|
54 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.