-qinitauto

Category

Error checking and debugging

Pragma equivalent

#pragma options [no]initauto

Purpose

Initializes uninitialized automatic variables to a specific value, for debugging purposes.

Syntax

Read syntax diagramSkip visual syntax diagram
        .-noinitauto-------------.   
>>- -q--+-initauto--=--hex_value-+-----------------------------><

Defaults

-qnoinitauto

Parameters

hex_value
A two-digit hexadecimal byte value.

Usage

This option generates extra code to initialize the value of automatic variables. It reduces the runtime performance of the program and should only be used for debugging.

Predefined macros

  • C++ only __INITAUTO__ is defined to the hex value specified on the -qinitauto option or pragma; otherwise, it is undefined.
  • C++ only __INITAUTO_W__ is defined to the hex value, repeated 4 times, specified on the -qinitauto option or pragma; otherwise, it is undefined.

Examples

To compile myprogram.c so that automatic variables are initialized to hex value FF (decimal 255), enter:
xlc myprogram.c -qinitauto=FF