RTCHECK | NORTCHECK

Category

Error checking and debugging

Pragma equivalent

None.

Purpose

Generates compare-and-trap instructions which perform certain types of runtime checking. The messages can help you to debug your C and C++ programs.

Syntax

Read syntax diagramSkip visual syntax diagram
   .-NORTCHECK------------------------.   
>>-+-RTCHECK--+---------------------+-+------------------------><
              '-(-+-ALL---------+-)-'     
                  | .-,-------. |         
                  | V         | |         
                  '---subopts-+-'         

Defaults

NORTCHECK

Parameters

suboption is one of the suboptions that are shown in Table 1.

The following table lists the RTCHECK suboptions and the messages they generate.

Note: Default RTCHECK suboptions are underlined.
Table 1. RTCHECK suboptions and descriptions
RTCHECK Suboption Description
ALL Automatically generates compare-and-trap instructions for all possible runtime checks. This suboption is equivalent to RTCHECK.
BOUNDS | NOBOUNDS Performs runtime checking of addresses when subscripting within an object of known size.
DIVZERO | NODIVZERO Performs runtime checking of integer division. A trap will occur if an attempt is made to divide by zero.
NULLPTR | NONULLPTR Performs runtime checking of addresses contained in pointer variables used to reference storage.

Usage

You can specify the RTCHECK option more than once. The suboption settings are accumulated, but the later suboptions override the earlier ones.

You can use the all suboption along with the no... form of one or more of the other options as a filter. For example, using:

xlc -qrtcheck=all:nonullptr

provides checking for everything except for addresses contained in pointer variables used to reference storage. If you use all with the no... form of the suboptions, all should be the first suboption.

Notes:
  1. The RTCHECK option is only valid for architecture level 8 or above, and for Language Environment® V1.10 and up.
  2. RTCHECK without suboption means RTCHECK(ALL).

Predefined macros

None.