User`s guide
Pragmas for the DSP56800 and DSP56800E
Pragma Reference
422
Targeting MC56F83xx/DSP5685x Controllers
Prototype
#pragma warn_impl_i2f_conv on | off | reset
Remarks
If you enable this pragma, the compiler issues a warning for implicitly converting
integral values to floating-point values. Listing C.24
provides an example.
Listing C.24 Example of Implicit int-to-float Conversion
#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 C/C++ Preprocessor
panel. To check this setting, use __option (warn_impl_i2f_conv),
described in Checking Settings
. By default, this pragma is disabled.
warn_impl_s2u_conv
Controls the issuing of warnings for implicit conversions between the signed int
and unsigned int data types.
Prototype
#pragma warn_impl_s2u_conv on | off | reset