initAuto Code Generation Option

Syntax: Default:
gen(initAuto[, yes])
gen(initAuto, value)
gen(initAuto, no)
gen(initAuto, no)

This option controls whether automatic storage is initialized, and optionally specifies the initial value.

ngaix.gif (1051 bytes)Automatic storage allocated using alloca is currently not initialized by gen(initAuto).

By default automatic storage is not initialized.

Specifying gen(initAuto) or gen(initAuto,yes) is equivalent to specifying gen(initAuto, 170). This initializes each byte of automatic storage to 0xAA, which is an easily recognized non-zero value.

You can specify any value in the range 0 to 255.  The value specified is placed in each byte of an automatic variable.  For example, when gen(initAuto,170) is specified, an automatic int variable would be set to 0xAAAAAAAA, rather than 0xAA or 0x000000AA.

You can use this option as an aid to debugging when it is helpful to know initial values. It is also helpful for detecting uninitialized local variables. However, because setting these values generates extra code, you should initialize automatic storage only for problem-solving.



Incremental C++ Build
C Compilation
Configuration Files


Set Build Options
Build


Code Generation Options
Code Generation Options