Controls the issuing of warnings for implicit float-to- int conversions.
#pragma warn_impl_f2i_conv on | off | reset
If you enable this pragma, the compiler issues a warning for implicitly converting floating-point values to integral values. The following listing provides an example.
#pragma warn_implicit_conv on #pragma warn_impl_f2i_conv on float f; signed int si; int main() { si = f; // WARNING #pragma warn_impl_f2i_conv off si = f; // 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_f2i_conv), described in Checking Pragma Settings. By default, this pragma is enabled.