User`s manual

280 digi.com Graphical User Interface
Run-Time Checking
These options, if checked, can allow a fatal error at run time. They also increase the amount of
code and cause slower execution, but they can be valuable debugging tools.
Array Indices: Check array bounds. This feature adds code for every array reference.
Pointers: Check for invalid pointer assignments. A pointer assignment is invalid if the
code attempts to write to a location marked as not writable. Locations marked not writ-
able include the entire root code segment. This feature adds code for every pointer ref-
erence.
Functions marked as nodebug disable the run-time checking options selected in the GUI.
Type Checking
This menu item allows the following choices:
Prototypes—Performs strict type checking of arguments of function calls against the
function prototype. The number of arguments passed must match the number of param-
eters in the prototype. In addition, the types of arguments must match those defined in
the prototype. Rabbit recommends prototype checking because it identifies likely run-
time problems. To use this feature fully, all functions should have prototypes (including
functions implemented in assembly).
Demotion—Detects demotion. A demotion automatically converts the value of a larger
or more complex type to the value of a smaller or less complex type. The increasing
order of complexity of scalar types is:
char
unsigned int
int
unsigned long
long
float
A demotion deserves a warning because information may be lost in the conversion. For
example, when a long variable whose value is 0x10000 is converted to an int value,
the resulting value is 0. The high-order 16 bits are lost. An explicit type casting can
eliminate demotion warnings. All demotion warnings are considered non-serious as far
as warning reports are concerned.
Pointer—Generates warnings if pointers to different types are intermixed without type
casting. While type casting has no effect in straightforward pointer assignments of dif-
ferent types, type casting does affect pointer arithmetic and pointer dereferences. All
pointer warnings are considered non-serious as far as warning reports are concerned.
Warning Reports
This tells the compiler whether to report all warnings, no warnings or serious warnings only. It
is advisable to let the compiler report all warnings because each warning is a potential run-
time bug. Demotions (such as converting a long to an int) are considered non-serious with
regard to warning reports.