Setting C Importer Preferences
You can change the default compiler options using the C
importer preference page.
Procedure
- Select Window > Preferences.
- Expand the Importer option and select C under the General tab. The following parameters can be modified:
Parameter Options Description Default Value Platform - Compiler - (unspecified)
- Windows (Msvc)
- Windows (icc)
- AIX® (gcc)
- AIX (xlc)
- OS/390®
The platform on which the C program compiles. Selecting a platform sets the other platform information attributes to default values that are appropriate for that platform. The platform default values still might be changed individually as desired. (unspecified) Floating point format - IEEE Extended INTEL
- IEEE Extended (AIX)
- IEEE Extended (OS/390)
- IEEE Non-Extended
- IBM® 390 Hexadecimal
The floating point format (IBM or IEEE). When the byte representation of floating point numbers is as defined in IBM System/370 Principles of Operation this is referred to as an IBM 390 Hexadecimal floating point format. When the byte representation of floating point numbers is as defined by IEEE standard 754, this is referred to as an IEEE Non-Extended floating point format. IEEE Extended INTEL Code Page Depending on the Platform property value the value and default value of this property changes as well:Table 1. Platform Code Page (Unspecified) 8859_1 Windows (Msvc) CP1252 Windows (icc) CP1252 AIX (gcc) ISO8859-1 AIX (xlc) ISO8859-1 OS/390 CP037 The Codepage of the target C program. 8859_1 - The Codepage of the target C program. The default codepage is set to 8859_1, to conform to most browsers.
Treat unsigned short arrays as strings - checked (true)
- Cleared (false)
If the Treat unsigned short arrays as strings check box is checked, then unsigned short arrays are treated as strings. If cleared, then unsigned short arrays are not treated as strings. false String encoding - NULL padded
- SPACE padded
Table 2. Platform Code Page (Unspecified) NULL padded Windows (Msvc) NULL padded Windows (icc) NULL padded AIX (gcc) NULL padded AIX (xlc) NULL padded OS/390 SPACE padded This property determines the format in which strings are encoded. - The value of NULL padded represents strings as character arrays, with the end of the string being terminated with the null character.
- The value of SPACE padded represents strings as character arrays, with the end of the string being padded out with spaces to the maximum length of the string. This setting is especially useful for a C program running inside a CICS® region.
NULL padded Byte order - Big endian
- Little endian
Table 3. Platform Code Page (Unspecified) Little endian Windows (Msvc) Little endian Windows (icc) Little endian AIX (gcc) Big endian AIX (xlc) Little endian OS/390 Little endian The byte representation of integers ordered from the most significant byte to the least significant byte is referred to as a big endian representation. The byte representation of integers ordered from the least significant byte to most significant byte is referred to as a little endian representation. Little endian - To change the advanced C compiler preferences, select the Advanced tab. The following parameters can be modified:
Parameter Options Description Default Value Include path Defines the list of directories to search for include files. None Address size - 32 bit
- 64 bit
The platform address size of 32 bits, or 64 bits. 32 bit Size of long double - 64 bit
- 128 bit
Depending on the Platform property value the value the default value of this property changes as well:Table 4. Platform Code Page (Unspecified) 64 bit Windows (Msvc) 64 bit Windows (icc) 128 bit AIX (gcc) 64 bit AIX (xlc) 64 bit OS/390 64 bit The storage size of a long double precision floating point value. It can be 64 bits or 128 bits. 64 Alignment rule - Natural
- Power®
- Packed
Depending on the Platform property value the value the default value of this property changes as well:Table 5. Platform Code Page (Unspecified) Natural Windows (Msvc) Packed Windows (icc) Packed AIX (gcc) Packed AIX (xlc) Power OS/390 Packed The alignment rule determines the storage layout of C structures. - Natural alignment is the most commonly used rule, under which a structure field is aligned at its natural boundary determined by its type.
- Power alignment is used by the xlc compiler on AIX.
- Packed alignment uses the pack level to determine the number of padding bytes between fields.
natural Pack level - 1
- 2
- 4
- 8
- 16
Depending on the Platform property value, the value and default value of Pack level changes as well:Table 6. Platform Code Page (Unspecified) Do not set Windows (Msvc) 8 Windows (icc) 8 AIX (gcc) 8 AIX (xlc) Do not set OS/390 1 The pack level can be 1, 2, 4, 8 bytes or 16 bytes. This value must match what was used to compile the C program that you are targeting. 1 Size of enumeration constant - Compact
- 1
- 2
- 4
Depending on the Platform property value, the value and default value of Size of enumeration constant changes as well:Table 7. Platform Code Page (Unspecified) 4 Windows (Msvc) 4 Windows (icc) 5 AIX (gcc) 4 AIX (xlc) 4 OS/390 4 Some compilers compact an enumeration constant into the smallest integral type that can contain all variables. Other compilers allow the option of selecting the number of bytes to use for an enumeration constant. 4 Size of wchar - 2 bytes
- 4 bytes
The storage size of a wchar type. Most platforms implement the size as 2 bytes although some platforms support a size of 4 bytes. 2 bytes
Feedback