source: tests/exceptions/except-3.cfa @ c0b2a631

ADTarm-ehast-experimentalenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change on this file since c0b2a631 was c0b2a631, checked in by Andrew Beach <ajbeach@…>, 4 years ago

Added the exceptions test folder.

  • Property mode set to 100644
File size: 318 bytes
Line 
1// Test that __attribute__((cleanup(...))) is working.
2
3#include <stdio.h>
4#include "except-mac.hfa"
5TRIVIAL_EXCEPTION(myth)
6
7int main (int argc, char * argv[]) {
8        try {
9                try {
10                        printf("throw [");
11                        THROW(&(myth){});
12                } finally {
13                        printf("] unwind <");
14                }
15        } catch (myth * error) {
16                printf("> catch\n");
17        }
18}
Note: See TracBrowser for help on using the repository browser.