This section contains information related to constants that is specific to the Sun ANSI/ISO C compiler.
Decimal, octal, and hexadecimal integral constants can be suffixed to indicate type, as shown in the Table 3-1.
Table 3-1 Data Type Suffixes
When assigning types to unsuffixed constants, the compiler uses the first of this list in which the value can be represented, depending on the size of the constant:
int
long int
unsigned long int
long long int
unsigned long long int
A multiple-character constant that is not an escape sequence has a value derived from the numeric values of each character. For example, the constant '123' has a value of:
Table 3-2 Multiple-character Constant (ANSI/ISO)
0 |
'3' |
'2' |
'1' |
or 0x333231.
With the -Xs option and in other, non-ANSI/ISO versions of C, the value is:
Table 3-3 Multiple-character Constant (non-ANSI/ISO)
0 |
'1' |
'2' |
'3' |
or 0x313233.