4.1.3 Processing System Dependent Items

The following shows compiler specifications for the implementation-defined items which are not prescribed in the language specifications.

(1)

Environment

Table 4.1

Environment Specifications

No.

Item

Compiler Specifications

1

Purpose of actual argument for the main function

Not stipulated

2

Structure of interactive I/O devices

Not stipulated

(2)

Identifiers

Table 4.2

Identifier Specifications

No.

Item

Compiler Specifications

1

Number of valid letters in non externally-linked identifiers (internal names)

Up to 8189 letters in both external and internal names

2

Number of valid letters in externally-linked identifiers (external names)

Up to 8191 letters in both external and internal names

3

Distinction of uppercase and lowercase letters in externally-linked identifiers (external names)

Uppercase and lowercase letters are distinguished

(3)

Characters

Table 4.3

Character Specifications

No.

Item

Compiler Specifications

1

Elements of source character sets and execution environment character sets

Source program character sets and execution environment character sets are both ASCII character sets. However, strings and character constants can be written in shift JIS or EUC Japanese character code, Latin1 code, or UTF-8 code.

2

Shift states used in coding multibyte characters

Shift states are not supported.

3

Number of bits for a character in character sets in program execution

8 bits

4

Relationship between source program character sets in character constants and strings and characters in execution environment character sets

Corresponds to same ASCII characters.

5

Values of integer character constants that include characters or escape sequences which are not stipulated in the language specifications

Characters and escape sequences which are not stipulated in the language specifications are not supported.

6

Values of character constants that include two or more characters, and wide character constants that include two or more multibyte characters

The first two bytes of character constants are valid. Wide character constants are not supported. Note that a warning error message is output if you specify more than one character.

7

Specifications of locale used for converting multibyte characters to wide characters

locale is not supported.

8

char type value

Same value range as unsigned char type*.

Note

* The char type has the same value range as -signed char type when the -signed_char option is specified.

(4)

Integers

Table 4.4

Integer Specifications

No.

Item

Compiler Specifications

1

Representation and values of integer types

See Table 4.5.

2

Values when integers are converted to shorter signed integer types or unsigned integers are converted to signed integer types of the same size (when converted values cannot be represented by the target type)

The least significant four bytes, two bytes, or one byte of the integer value will respectively be the post-conversion value when the size of the post-conversion type is four bytes, two bytes, or one byte.

3

Result of bit-wise operations on signed integers

Signed value.

4

Remainder sign in integer division

Same sign as dividend.

5

Result of right shift of signed scalar types with a negative value

Maintains sign bit.

Table 4.5

Range of Integer Types and Values

No.

Type

Value Range

Data Size

1

char *1

0 to 255

1 byte

2

signed char

128 to 127

1 byte

3

unsigned char

0 to 255

1 byte

4

short, signed short

32768 to 32767

2 bytes

5

unsigned short

0 to 65535

2 bytes

6

int*2, signed int*2

2147483648 to 2147483647

4 bytes

7

unsigned int*2

0 to 4294967295

4 bytes

8

long, signed long

2147483648 to 2147483647

4 bytes

9

unsigned long

0 to 4294967295

4 bytes

10

long long, signed long long

9223372036854775808 to 9223372036854775807

8 bytes

11

unsigned long long

0 to 18446744073709551615

8 bytes

Notes 1.

When the -signed_char option is specified, the char type has the same value range as signed char type.

Notes 2.

When the int_to_short option is specified, the int type is handled as the short type, the signed int type as the signed short type, and the unsigned int type as the unsigned short type.

(5)

Floating-Point Numbers

Table 4.6

Floating-Point Number Specifications

No.

Item

Compiler Specifications

1

Representation and values of floating-point types

There are three types of floating-point numbers: float, double, and long double types. See section 4.1.4 (5) Floating-Point Numbers for the internal representation of floating-point types and specifications for their conversion and operation. Table 4.7 shows the limits of floating-point type values that can be expressed.

2

Method of truncation when integers are converted into floating-point numbers that cannot accurately represent the actual value

3

Methods of truncation or rounding when floating-point numbers are converted into shorter floating-point types

 

 

 

Table 4.7

Limits of Floating-Point Type Values

 

 

Limits

No.

Item

Decimal Notation*1

Internal Representation (Hexadecimal)

1

Maximum value of float type

3.4028235677973364e+38f
(3.4028234663852886e+38f)

7f7fffff

2

Minimum positive value of float type

7.0064923216240862e46f
(1.4012984643248171e45f)

00000001

3

Maximum values of double type and long double type*2

1.7976931348623158e+308
(1.7976931348623157e+308)

7fefffffffffffff

4

Minimum positive values of double type and long double type *2

4.9406564584124655e324
(4.9406564584124654e324)

0000000000000001

Notes 1.

The limits for decimal notation are the maximum value smaller than infinity and the minimum value greater than 0. Values in parentheses are theoretical values.

Notes 2.

These values are the limits when dbl_size=8 is specified. When dbl_size=4 is specified, the double type and long double type have the same value as the float type.

(6)

Arrays and Pointers

Table 4.8

Array and Pointer Specifications

No.

Item

Compiler Specifications

1

Integer type (size_t) required to hold maximum array size

unsigned long type

2

Conversion from pointer type to integer type (pointer type size >= integer type size)

Value of least significant byte of pointer type

3

Conversion from pointer type to integer type (pointer type size < integer type size)

Zero extension

4

Conversion from integer type to pointer type (integer type size >= pointer type size)

Value of least significant byte of integer type

5

Conversion from integer type to pointer type (integer type size < pointer type size)

Sign extension

6

Integer type (ptrdiff_t) required to hold difference between pointers to members in the same array

int type

(7)

Registers

Table 4.9

Register Specifications

No.

Item

Compiler Specifications

1

Types of variables that can be assigned to registers

char, signed char, unsigned char, bool, _Bool, short, unsigned short, int, unsigned int, long, unsigned long, long long, unsigned long long, float, pointer

(8)

Class, Structure, Union, and Enumeration Types, and Bit Fields

Table 4.10

Class, Structure, Union, and Enumeration Types, and Bit Field Specifications

No.

Item

Compiler Specifications

1

Referencing members in union type accessed by members of different types

Can be referenced but value cannot be guaranteed.

2

Boundary alignment of class and structure members

The maximum alignment value of the class and structure members is used as the boundary alignment value. For details on assignment, see section 4.1.4 (2) Compound Type (C), Class Type (C++).

3

Sign of bit fields of simple int type

unsigned int type *3

4

Order of bit fields within int type size

Assigned from least significant bit.*1 *2

5

Method of assignment when the size of a bit field assigned after a bit field is assigned within an int type size exceeds the remaining size in the int type

Assigned to next int type area.*1

6

Type specifiers allowed for bit fields

char, unsigned char, bool, _Bool, short, unsigned short, int, unsigned int, long, unsigned long, enum, long long, unsigned long long

7

Integer type representing value of enumeration type

int type*4

Notes 1.

For details of assignment of bit fields, see section4.1.4 Internal Data Representation and Areas.

Notes 2.

Specifying the bit_order=left option assigns bit fields from the most significant bit.

Notes 3.

When the signed_bitfield option is specified, the sign of bit fields is handled as the signed int type.

Notes 4.

When the auto_enum option is specified, the smallest type that holds enumeration values is selected. For details, refer to the description of the auto_enum option of the Compile Options section.

(9)

Type Qualifiers

Table 4.11

Type Qualifier Specifications

No.

Item

Compiler Specifications

1

Types of access to data qualified with volatile

Not stipulated

(10)

Declarations

Table 4.12

Declaration Specifications

No.

Item

Compiler Specifications

1

Number of declarations modifying basic types (arithmetic types, structure types, union types)

16 max.

The following shows examples of counting the number of types modifying basic types.

i. int a; Here, a has an int type (basic type) and the number of types modifying the basic type is 0.

ii. char *f(); Here, f has a function type returning a pointer type to a char type (basic type), and the number of types modifying the basic type is 2.

(11)

Statements

Table 4.13

Statement Specifications

No.

Item

Compiler Specifications

1

Number of case labels that can be declared in one switch statement

2,147,483,646 max.

(12)

Preprocessor

Table 4.14

Preprocessor Specifications

No.

Item

Compiler Specifications

1

Relationship between single-character character constants in constant expressions in a conditional inclusion, and execution environment character sets

Preprocessor statement character constants are the same as the execution environment character set.

2

Method of reading include files

Files enclosed in "<" and ">" are read from the directory specified in the include option. If the file is not found, the search proceeds to the folder specified as the INC_RX environment variable.

3

Support for include files enclosed in double-quotes

Supported. The include file is read from the folder holding the file with the #include directive. If the file is not found, the file is searched for as described in 2, above.

4

Space characters in strings after a macro is expanded

A string of space characters are expanded as one space character.

5

Operation of #pragma statements

See 4.2.3 #pragma Directive

6

__DATE__ and __TIME__ values

Values are specified based on the host computers timer at the start of compiling.