/Gn (Remove P-Code Native Entry Points)

The /Gn option lets you remove the native-code entry point from the beginning of a p-code function that does not require it, saving about four bytes for each function. This option must be used in conjunction with the /Oq option.

Native-code entry points are a short series of machine code instructions placed at the beginning of a function compiled into p-code. They are generated by the compiler in programs that mix p-code and machine code.

You can only use the /Gn option to remove the native-code entry point from functions called by other functions that you plan to compile into p-code.

You can control the removal of native-code entry points from within your source file using the native_caller pragma. This pragma takes “on” or “off” as an argument.

For example, to turn off native-code entry point generation for a p-code function, enter the following line prior to the beginning of the function:

#pragma native_caller (off)

Then turn the native_caller pragma back on after the end of the function by entering:

#pragma native_caller (on)