Ignore:
Timestamp:
Jun 24, 2020, 12:30:42 PM (2 years ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
arm-eh, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation
Children:
8b58bae
Parents:
a8a3485
Message:

Fixed a problem with 'throwResume;' translation and added some tests to check for similar problems.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/exceptions/terminate.cfa

    ra8a3485 r7f9968a  
    88TRIVIAL_EXCEPTION(zen);
    99TRIVIAL_EXCEPTION(moment_of, zen);
     10
     11void in_void(void);
    1012
    1113int main(int argc, char * argv[]) {
     
    121123                printf("outer catch\n");
    122124        }
     125        printf("\n");
     126
     127        in_void();
    123128}
     129
     130// Do a throw and rethrow in a void function.
     131void in_void(void) {
     132        try {
     133                try {
     134                        printf("throw\n");
     135                        throw (zen){};
     136                } catch (zen *) {
     137                        printf("rethrow\n");
     138                        throw;
     139                }
     140        } catch (zen *) {
     141                printf("handle\n");
     142        }
     143}
     144
Note: See TracChangeset for help on using the changeset viewer.