warn_implicitconv

Controls the issuing of warning messages for all implicit arithmetic conversions.

Syntax
#pragma warn_implicitconv on | off | reset
  
Remarks

If you enable this pragma, the compiler issues a warning message for all implicit arithmetic conversions when the destination type might not represent the source value. Example of Implicit Conversion provides an example.

Listing 1. Example of Implicit Conversion
#pragma warn_implicitconv on

float f;
signed int si;
unsigned int ui;

int main()
{
    f  = si; /* WARNING */
    si = f; /* WARNING */
    ui = si; /* WARNING */
    si = ui; /* WARNING */
}
Note: This option "opens the gate" for the checking of implicit conversions. The sub-pragmas warn_impl_f2i_conv , warn_impl_i2f_conv , and warn_impl_s2u_conv control the classes of conversions checked.

By default, this pragma is off .

Related information
extended_errorcheck
maxerrorcount
message
showmessagenumber
show_error_filestack
suppress_warnings
sym
unused
warning
warning_errors
warn_any_ptr_int_conv
warn_emptydecl
warn_extracomma
warn_filenamecaps
warn_filenamecaps_system
warn_hiddenlocals
warn_illpragma
warn_illtokenpasting
warn_illunionmembers
warn_impl_f2i_conv
warn_impl_i2f_conv
warn_impl_s2u_conv
warn_largeargs
warn_missingreturn
warn_no_side_effect
warn_padding
warn_pch_portability
warn_possunwant
warn_ptr_int_conv
warn_resultnotused
warn_undefmacro
warn_uninitializedvar
warn_unusedarg
warn_unusedvar