warn_any_ptr_int_conv

Controls if the compiler generates a warning message when an integral type is explicitly converted to a pointer type or vice versa.

Syntax
#pragma warn_any_ptr_int_conv on | off | reset
  
Remarks

This pragma is useful to identify potential 64-bit pointer portability issues. An example is shown in.

Listing 1. Example of warn_any_ptr_int_conv
#pragma warn_ptr_int_conv on

short i, *ip

void func() {
   i = (short)ip;
   /* WARNING: short type is not large enough to hold pointer. */
}

#pragma warn_any_ptr_int_conv on

void bar() {
   i  = (int)ip; /* WARNING: pointer to integral conversion. */
   ip = (short *)i; /* WARNING: integral to pointer conversion. */
}
Remarks

By default, this pragma is off .

Related information
extended_errorcheck
maxerrorcount
message
showmessagenumber
show_error_filestack
suppress_warnings
sym
unused
warning
warning_errors
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_implicitconv
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