-int_to_short


< Compile Options / Microcontroller Options >

[Format]

-int_to_short

 

-

[Default]

Before compilation, the int type is not replaced with the short type and the unsigned int type is not replaced with the unsigned short type in the source file.

[Description]

-

Before compilation, the int type is replaced with the short type and the unsigned int type is replaced with the unsigned short type in the source file.

[Remarks]

-

INT_MAX, INT_MIN, and UINT_MAX of limits.h are not converted by this option.

-

This option is invalid during C++ and EC++ program compilation. If an external name of a C program may be referred to by a C++, EC++ program, message W0523041 will be output for the external name.

-

When the int_to_short option is specified and a file including a C standard header is compiled as C++ or EC++, the compiler may show the W0523041 message. In this case, simply ignore the message because it does not indicate a problem.

-

Data that are shared between C and C++ (EC++) programs must be declared as the long or short type rather than as the int type.

-

When an input function having a format such as that of scanf in the standard library is called while this option is enabled, be sure to pass the addresses of the variables of the long and unsigned long types as parameters for use in %d and %u conversion. If the address of the int-type or unsigned-type variables not declared as long is passed, the program might not handle related operations correctly.