Controls the issuing of warnings for implicit int-to- float conversions.
#pragma warn_impl_i2f_conv on | off | reset
If you enable this pragma, the compiler issues a warning for implicitly converting integral values to floating-point values. The following listing provides an example.
#pragma warn_implicit_conv on #pragma warn_impl_i2f_conv on float f; signed int si; int main() { f = si; // WARNING #pragma warn_impl_i2f_conv off f = si; // OK }
Use this pragma along with the warn_implicitconv pragma.
This pragma does not correspond to any panel setting in the Language panel. To check this setting, use __option (warn_impl_i2f_conv), described in Checking Pragma Settings. By default, this pragma is disabled.