source: tests/except-3.cfa @ e782290

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprpersistent-indexerpthread-emulationqualifiedEnum
Last change on this file since e782290 was dc8511c, checked in by Peter A. Buhr <pabuhr@…>, 6 years ago

first attempt at updating suffixes for test programs

  • Property mode set to 100644
File size: 318 bytes
RevLine 
[e9145a3]1// Test that __attribute__((cleanup(...))) is working.
2
3#include <stdio.h>
[dc8511c]4#include "except-mac.hfa"
[e9145a3]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.