Using Run-Time Checks
Other versions of this page are also available for the following:
8/27/2008
If you are working in an x86 environment, you can use native run-time checks to catch common run-time errors such as:
- Stack pointer corruption
- Overruns of local arrays
- Stack corruption
- Dependencies on uninitialized local variables
- Loss of data on an assignment to a shorter variable
To enable run-time checks in a debug build, use the /RTC - Run-Time Error Checks option and link with the debug version of a C run-time library.
You cannot use /RTC with an optimized (/O) build. A compiler error results.
When you debug a program with run-time checks enabled, the default action is for the program to stop and break to the debugger when a run-time error occurs.