source: src/tests/Exception.c @ 7a48361a

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsctordeferred_resndemanglerenumforall-pointer-decaygc_noraiijacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change on this file since 7a48361a was 62edde5, checked in by Thierry Delisle <tdelisle@…>, 8 years ago

added new tests folder to replace existing one

  • Property mode set to 100644
File size: 509 bytes
Line 
1//Testing esceptions syntax
2int fred() {
3    int x;
4    throw 3;
5    throw x = 5;
6
7    try {
8    } catch( int i ) {}
9
10    try {
11        x/4;
12    } catch( int) {
13    } catch( int x ) {
14    } catch( struct { int i; } ) {
15    } catch( struct { int i; } x ) {
16    } catch( struct { int i; } *x ) {
17
18// Cforall extensions
19
20    } catch( * struct { int i; } ) {
21    } catch( * struct { int i; } x ) {
22    } catch( ... ) {
23//    } finally {
24    } // try
25}
26
27//Dummy main
28int main(int argc, char const *argv[])
29{
30        return 0;
31}
Note: See TracBrowser for help on using the repository browser.