ReactOS 0.4.15-dev-7931-gfd331f1
seh0017.c
Go to the documentation of this file.
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
8char test[] = "SEH0017.c";
9
10int main() {
11
13
14 Counter = 0;
15
16 try {
17 try {
18 /* set counter = 1 */
19 Counter += 1;
20 }
21 finally {
22 /* set counter = 2 */
23 Counter += 1;
24#if defined(_MSC_VER) && !defined(__clang__)
25 goto t12; /* can't jump into a try/finally */
26#endif
27 }
28 endtry
29
30 t12:
31 ;
32 }
33 finally {
34 /* set counter = 3 */
35 Counter += 1;
36 }
37 endtry
38
39 if (Counter != 3) {
40 printf("TEST 17 FAILED. Counter = %d\n\r", Counter);
41 return -1;
42 }
43
44 return 0;
45}
#define printf
Definition: freeldr.h:97
long LONG
Definition: pedump.c:60
char test[]
Definition: seh0017.c:8
int main()
Definition: seh0017.c:10
#define endtry
Definition: seh.h:24
static LARGE_INTEGER Counter
Definition: clock.c:43