(Builder: Project > Options for Selected Files... > Run-time Error tab)
Select the options that enable the desired error checks. Most of these checks occur at run-time, although some occur at compile time.
Maintains the previous or inherited setting. Originally, the default is None.
Equivalent to the -check=alloc command line option. Enables the Debugger's findleaks command and checks for the following memory errors. (See also "Finding memory leaks".)
If the program attempts to free memory not previously allocated, this error is reported:
Attempt to free something not allocated
If the program attempts to free memory already free, sometimes the previous error message is reported here. Otherwise, this error is reported:
Attempt to free something already free
If the program attempts to allocate memory after various other errors occurred, this error report appears:
Malloc internals (free list?) corrupted
Generates an error message when the program tries to access memory that is not yet allocated. (Equivalent to the -check=memory command line option.). It displays the appropriate Allocation error messages, above, in addition to the following:
Attempt to read/write memory not yet allocated
Checks array indexes against array bounds. For constant indexes, this check occurs at compile-time; for other expressions at run-time. (Equivalent to the -check=bounds command line option.)
Array index out of bounds
When assigning a value to a variable or field which is a small integral type such as a bit field, this checks if the value is within the range of the type (Equivalent to the -check=assignbound command line option.). The error messages are:
Assignment out of bounds
or
Value outside of type
Generates an error message for all dereferences of NULL pointers (Equivalent to the -check=nilderef command line option.). The error message is:
NULL pointer dereference
Generates a warning if the case/switch expression does not match any of the case/switch labels. This does not apply when using a default case/switch label (Equivalent to the -check=switch command line option.). The error message is:
Case/switch index out of bounds
Generates an error message indicating a divide by zero. (Equivalent to the -check=zerodivide command line option.). The error message is:
Divide by 0
Generates an error message at compile-time for declared variables never used. (Equivalent to the -check=usevariable command line option.). The error message is:
Unused variable
Checks that the tag field of a variable declared as a variant record type matches one of the case selectors in the record. This applies only to Pascal (Equivalent to the -check=variant command line option.). The error message is:
Bad variant for reference
Enables the Debugger command watchpoint to create one watchpoint without using an assertion (Equivalent to the -check=watchpoint command line option.) See also "watchpoint". The error message is:
Write to watchpoint
Generates a warning if a non-void procedure ends without an explicit return. For example, the following procedure generates a warning when exiting:
int func() {
for (int x = 0; x< 10; x++)
{
if (x == 10)
return x;
}
}
This option only applies to C and C++. (Equivalent to the -check=return command line option.). The error message is:
No value returned from function