1 // Copyright (c) Microsoft. All rights reserved.
2 // Licensed under the MIT license. See LICENSE file in the project root for
3 // full license information.
4 
5 #include <windows.h>
6 #include "seh.h"
7 
8 char test[] = "SEH0003.c";
9 int perfect;
10 
11 int main() {
12   LONG Counter;
13 
14   Counter = 0;
15 
16   try {
17     Counter -= 1;
18     RaiseException(EXCEPTION_INT_OVERFLOW, 0, /* no flags */
19                    0, NULL);
20   }
21   except(Counter)
22   /* counter should be negative, indicating "CONTINUE EXECUTE" */
23   {
24     Counter -= 1;
25   }
26   endtry
27 
28   if (Counter != -1) {
29     printf("TEST 3 FAILED.  Counter = %d\n\r", Counter);
30     return -1;
31   }
32 
33   return 0;
34 }
35