source: tests/quasiKeyword.cfa@ 445b281

Last change on this file since 445b281 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
RevLine 
[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.
[c715e5f]6//
[07c77ce]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
[c715e5f]12//
[07c77ce]13
[c715e5f]14exception E {};
[2853d6f]15vtable(E) E_vt;
[07c77ce]16
[2853d6f]17void catch( int i ) { (void) i; }
18void recover( int i ) { (void) i; }
19void catchResume( int i ) { (void) i; }
20void fixup( int i ) { (void) i; }
21void finally( int i ) { (void) i; }
[07c77ce]22
[2853d6f]23int main() {
[07c77ce]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 );
[2853d6f]36 throw (E){ & E_vt };
37 report (E){ & E_vt };
38 throwResume (E){ & E_vt };
[07c77ce]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 {
[c715e5f]50 }
[07c77ce]51 else catch = 3;
52
[2853d6f]53 printf("done\n");
[07c77ce]54}
Note: See TracBrowser for help on using the repository browser.