warn_impl_s2u_conv

Controls the issuing of warnings for implicit conversions between the signed int and unsigned int data types.

Syntax
  #pragma warn_impl_s2u_conv on | off | reset  
Remarks

If you enable this pragma, the compiler issues a warning for implicitly converting either from signed int to unsigned int or vice versa. The following listing provides an example.

Listing: Example of Implicit Conversions Between Signed int and Unsigned int
#pragma warn_implicit_conv on

#pragma warn_impl_s2u_conv on



signed int si;



unsigned int ui;



int main()



{



    ui = si;    // WARNING



    si = ui;    // WARNING



#pragma warn_impl_s2u_conv off



    ui = si;    // OK



    si = ui;    // 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_s2u_conv), described in Checking Pragma Settings. By default, this pragma is enabled.