Controls the issuing of warnings for all implicit arithmetic conversions.
#pragma warn_implicitconv on | off | reset
If you enable this pragma, the compiler issues a warning for all implicit arithmetic conversions when the destination type might not represent the source value. The following listing provides an example.
#pragma warn_implicitconv on float f; signed int si; unsigned int ui; int main() { f = si; // OK si = f; // WARNING ui = si; // WARNING si = ui; // WARNING }
The default setting for warn_impl_i2fconf pragma is disabled. Use the warn_implicitconv pragma along with the warn_impl_i2f_conv pragma to generate the warning for the int-to-float conversion.
This pragma corresponds to the Implicit Arithmetic Conversions setting in the Language panel. To check this setting, use __option (warn_implicitconv), described in Checking Pragma Settings. By default, this pragma is disabled.