Compiler Warning (level 1) C4784

cannot initialize code-based pointer to 'identifier' in small model - generating large model

You're trying to statically initialize a code-based pointer when compiling with a small memory model (using the /AS option).

To avoid this warning, compile with a medium, compact, or large memory model (using the /AM, /AC, or /AL options, respectively), or dynamically initialize the problem pointer.

Here's an example of the type of statement that can cause this problem:

__declspec(allocate("_CODE")) int *p = &i ;

The above example could be fixed by replacing the statement with the following:

__declspec(allocate("_CODE")) int *p ;
main() {
   p = &i ;
   .
   .
   .
}