ADTast-experimentalenumforall-pointer-decayjacob/cs343-translationnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change
on this file since ea593a3 was
ea593a3,
checked in by Andrew Beach <ajbeach@…>, 3 years ago
|
First draft of all the exception benchmarks. There is an issue with the Cforall linking.
|
-
Property mode set to
100644
|
File size:
483 bytes
|
Rev | Line | |
---|
[ea593a3] | 1 | // Cross a Try Statement with a Termination Handler |
---|
| 2 | #include <exception.hfa> |
---|
| 3 | #include <stdlib.hfa> |
---|
| 4 | |
---|
| 5 | EHM_EXCEPTION(not_raised_exception)(); |
---|
| 6 | |
---|
| 7 | int main(int argc, char * argv[]) { |
---|
| 8 | unsigned int times = 1; |
---|
| 9 | unsigned int total_frames = 1; |
---|
| 10 | if (2 < argc) { |
---|
| 11 | times = strtol(argv[1], 0p, 10); |
---|
| 12 | } |
---|
| 13 | if (3 < argc) { |
---|
| 14 | total_frames = strtol(argv[2], 0p, 10); |
---|
| 15 | } |
---|
| 16 | |
---|
| 17 | for (unsigned int count = 0 ; count < times ; ++count) { |
---|
| 18 | try { |
---|
| 19 | // ... |
---|
| 20 | } catch (not_raised_exception *) { |
---|
| 21 | // ... |
---|
| 22 | } |
---|
| 23 | } |
---|
| 24 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.