source: tests/nowarn/exception.cfa@ 6f9f338

Last change on this file since 6f9f338 was fb0f04d, checked in by Michael Brooks <mlbrooks@…>, 9 months ago

Fix exceptions to be warning-free.

  • Property mode set to 100644
File size: 519 bytes
Line 
1exception SkyFalling{
2 int fromHeight;
3};
4__attribute__(( cfa_linkonce )) vtable( SkyFalling ) SkyFalling_vt;
5void manual() {
6 try {
7 throwResume (SkyFalling){ & SkyFalling_vt, 42 };
8 } catch ( SkyFalling * ) {
9 }
10}
11
12#include <Exception.hfa>
13
14ExceptionDecl( WaterRising, int fromDepth; );
15void abbreviated() {
16 try {
17 throwResume ExceptionInst( WaterRising, 42 );
18 } catch ( WaterRising * ) {
19 }
20}
21
22int main() {
23 manual();
24 abbreviated();
25 printf("done\n");
26 return 0;
27}
Note: See TracBrowser for help on using the repository browser.