Ignore:
Timestamp:
Jul 20, 2021, 6:34:22 PM (3 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
6acd020, f9d8755
Parents:
d30804a (diff), 54651005 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/theses/andrew_beach_MMath/code/cross-catch.cfa

    rd30804a r86fc350  
    77EHM_EXCEPTION(not_raised_exception)();
    88
     9EHM_VIRTUAL_TABLE(not_raised_exception, not_vt);
     10
    911int main(int argc, char * argv[]) {
    1012        unsigned int times = 1;
    11         unsigned int total_frames = 1;
     13        bool should_throw = false;
    1214        if (1 < argc) {
    1315                times = strtol(argv[1], 0p, 10);
    14         }
    15         if (2 < argc) {
    16                 total_frames = strtol(argv[2], 0p, 10);
    1716        }
    1817
     
    2019        for (unsigned int count = 0 ; count < times ; ++count) {
    2120                try {
    22                         // ...
     21                        asm volatile ("# try block" : "=rm" (should_throw));
     22                        if (should_throw) {
     23                                throw (not_raised_exception){&not_vt};
     24                        }
    2325                } catch (not_raised_exception *) {
    24                         // ...
     26                        asm volatile ("# catch block");
    2527                }
    2628        }
Note: See TracChangeset for help on using the changeset viewer.