source: tests/quasiKeyword.cfa @ cf444b6

ADTast-experimentalenumforall-pointer-decayjacob/cs343-translationnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change on this file since cf444b6 was 53692b3, checked in by Peter A. Buhr <pabuhr@…>, 3 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
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#include <exception.hfa>
15
16EHM_EXCEPTION( E )();
17
18void catch( int i ) {}
19void recover( int i ) {}
20void catchResume( int i ) {}
21void fixup( int i ) {}
22void finally( int i ) {}
23
24int 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
54    #pragma GCC warning "Compiled"                      // force non-empty .expect file, NO TABS!!!
55}
Note: See TracBrowser for help on using the repository browser.