ENUMSIZE(SMALL) and protected enumeration types in system header files
As of z/OS® V1R7 XL C/C++ compiler, selected enumerated (enum) type declarations in system header files are protected to avoid potential execution errors. This allows you to specify the ENUMSIZE compiler option with a value other than SMALL without risking incorrect mapping of enum data types (for example, if they were used inside of a structure).
With earlier versions of the compiler, if you specified ENUMSIZE() with a value other than SMALL, data that was declared with certain enum types could be incorrectly mapped. In some instances, the header files in the library referenced the types (such as __device_t in the typedef fldata_t), which resulted in a potential inconsistency between the mapping seen during application execution and that declared in the library (which is built with the default ENUMSIZE(SMALL)).
Header file | Enumerations |
---|---|
stdio.h | __device_t |
search.h | ACTION |
sys/uio.h | uio_rw |
sys/wait.h | idtype_t |
_Ccsid.h | __csType |
__ledebug.h | asfAmodeType |
yvals.h | _Mux |