12 int except_mask
= FE_DIVBYZERO
| FE_INVALID
| FE_OVERFLOW
| FE_UNDERFLOW
;
13 int status
= feenableexcept (except_mask
);
15 except_mask
= fegetexcept ();
16 if (except_mask
== -1)
18 printf("\nBefore getcontext(): fegetexcept returned: %d\n",
24 status
= getcontext(&ctx
);
27 printf("\ngetcontext failed, errno: %d.\n", errno
);
31 printf ("\nDone with getcontext()!\n");
34 int mask
= fegetexcept ();
35 if (mask
!= except_mask
)
37 printf("\nAfter getcontext(): fegetexcept returned: %d, expected: %d.\n",
42 printf("\nAt end fegetexcept() returned %d, expected: %d.\n",
47 #define TEST_FUNCTION do_test ()
48 #include "../test-skeleton.c"