-check


< Compile Options / Source Options >

[Format]

-check = { nc | ch38 | shc }

[Description]

-

This option checks the specified options and source file parts which will affect the compatibility when this compiler uses a C/C++ source file that has been coded for the R8C and M16C family C compilers, H8, H8S, and H8SX family C/C++ compilers, and SuperH family C/C++ compilers.

-

For check=nc, the compatibility with the R8C and M16C family C compilers is checked. Checking will be for the following options and types:

-

Options: signed_char, signed_bitfield, bit_order=left, endian=big, and dbl_size=4

-

inline, enum type, #pragma BITADDRESS, #pragma ROM, #pragma PARAMETER, and asm()

-

Assignment of a constant outside the signed short range to the int or signed int type or assignment of a constant outside the unsigned short range to the int or unsigned int type while -int_to_short is not specified

-

Assignment of a constant outside both of the signed short and unsigned short ranges to the long or long long type

-

Comparison expression between a constant outside the signed short range and the int, short, or char type (except the signed char type)

-

For check=ch38, the compatibility with the H8, H8S, and H8SX family C/C++ compilers is checked. Checking will be for the following options and types:

-

Options: unsigned_char, unsigned_bitfield, bit_order=right, endian=little, and dbl_size=4

-

__asm and #pragma unpack

-

Comparison expression with a constant greater than the maximum value of signed long

-

Assignment of a constant outside the signed short range to the int or signed int type or assignment of a constant outside the unsigned short range to the int or unsigned int type while -int_to_short is not specified

-

Assignment of a constant outside both of the signed short and unsigned short ranges to the long or long long type

-

Comparison expression between a constant outside the signed short range and the int, short, or char type (except the signed char type)

-

For check=shc, the compatibility with the SuperH family C/C++ compilers is checked. Checking will be for the following options and types:

-

Options: unsigned_char, unsigned_bitfield, bit_order=right, endian=little, dbl_size=4, and round=nearest

-

#pragma unpack

-

volatile qualified variables

-

Confirm the following notes for the displayed items.

-

Options: The settings which are not defined in the language specification and depend on implementation differ in each compiler. Confirm the settings of the options that were output in a message.

-

Extended specifications: There is a possibility that extended specifications will affect program operation. Confirm the descriptions on the extended specifications that were output in a message.

[Remarks]

-

When dbl_size=4 is enabled, the results of type conversion related to floating-point numbers and the results of library calculation may differ from those in the R8C and M16C family C compilers, H8, H8S, and H8SX family C/C++ compilers, and SuperH family C/C++ compilers. When dbl_size=4 is specified, this compiler handles double type and long double type as 32 bits, but the R8C and M16C family C compilers (fdouble_32), H8, H8S, and H8SX family C/C++ compilers (double=float), and SuperH family C/C++ compilers (double=float) handle only double type as 32 bits.

-

The result of a binary operation (addition, subtraction, multiplication, division, comparison, etc.) with unsigned int type and long type operands may differ from that in the SuperH family C/C++ compilers. In this compiler, the types of the operands are converted to the unsigned long type before operation. However, in the SuperH family C/C++ compilers (only when strict_ansi is not specified), the types of the operands are converted to the signed long long type before operation.

-

The data size of reading from and writing to a volatile qualified variable may differ from that in the SuperH family C/C++ compilers. This is because a volatile qualified bit field may be accessed in a size smaller than that of the declaration type in this compiler. However, in the SuperH family C/C++ compilers, a volatile qualified bit field is accessed in the same size as that of the declaration type.

-

This option does not output a message regarding allocation of structure members and bit field members. When an allocation-conscious declaration is made, refer to the Internal Data Representation and Areas section of the COMPILER LANGUAGE SPECIFICATIONS chapter.

-

In the R8C and M16C family C compilers (fextend_to_int is not specified), the generated code has been evaluated without performing generalized integer promotion by a conditional expression. Accordingly, operation of such a code may differ from a code generated by this compiler.