enumSize Code Generation Option

Syntax: Default:
gen(enumSize, int)
gen(enumSize, small)
gen(enumSize, bytes)
gen(enumSize, int)
gen(enumSize, small)

This option sets the storage space allocated to enum variables, as described in the table below:

int Enumerations occupy 4 bytes of storage, using only signed integer as the underlying data type. Default.
small Enumerations occupy a minimal amount of storage: either 1, 2, or 4 bytes of storage, depending on the range of the enum constants. Default.
bytes = 1, 2, or 4 Enumerations occupy 1, 2, or 4 bytes of storage.  

When gen(enumSize, small) is specified, the underlying data type used for enum variables is selected according to the following priority: unsigned char, signed char, unsigned short, signed short, unsigned int, and signed int.

If the specified storage size is smaller than that required by the range of enum variables, an (S) error message is issued.



Incremental C++ Build
C Compilation
Configuration Files


Set Build Options
Build


Code Generation Options
Code Generation Options