ReactOS 0.4.15-dev-5666-gc548b97
vcatch.cpp File Reference
#include <stdio.h>
#include <malloc.h>
Include dependency graph for vcatch.cpp:

Go to the source code of this file.

Functions

 __declspec (align(64)) struct X
 
void t (char *c)
 
bool f ()
 
int main ()
 

Function Documentation

◆ __declspec()

__declspec ( align(64)  )

Definition at line 11 of file vcatch.cpp.

12{
13 X() : x(3) { }
14 ~X() { }
15 volatile int x;
16};
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define X(b, s)

◆ f()

bool f ( )

Definition at line 24 of file vcatch.cpp.

25{
26 char * buf = (char *) _alloca(10);
27 X x;
28 volatile bool caught = false;
29
30 try
31 {
32 t(buf);
33 }
34 catch(int)
35 {
36 caught = true;
37 x.x = 2;
38 }
39
40 return caught;
41}
GLdouble GLdouble t
Definition: gl.h:2047
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751

Referenced by main().

◆ main()

int main ( void  )

Definition at line 43 of file vcatch.cpp.

44{
45 bool result = false;
46
47 __try {
48 result = f();
49 }
50 __except(1)
51 {
52 printf("ERROR - Unexpectedly caught an exception\n");
53 }
54
55 printf(result ? "passed\n" : "failed\n");
56 return result ? 0 : -1;
57}
#define printf
Definition: freeldr.h:94
GLuint64EXT * result
Definition: glext.h:11304
bool f()
Definition: vcatch.cpp:24

◆ t()

void t ( char c)

Definition at line 18 of file vcatch.cpp.

19{
20 c[4] = 'a';
21 throw 123;
22}
const GLubyte * c
Definition: glext.h:8905