Table of Contents        Previous topic       Next topic       

C COMPILER->Pragmas->#pragma optimize

#pragma optimize( "[optimization-list]", {on | off} )

Specifies optimizations to be performed on a function-by-function basis. The optimize pragma must appear outside a function and takes effect at the first function defined after the pragma is seen. The on and off arguments turn options specified in the optimization-list on or off.
gperform global register allocation
ruse register keywords
ffavour faster code
ipreserve internal data memory
psuppress integral promotion
sdefault to reentrant functons
These are the same letters used with the /O compiler options. For example,

#pragma optimize( "rg", on )

Using the optimize pragma with the empty string (" ") either turns off all optimizations or restores them to their original settings.

#pragma optimize( "", off )

#pragma optimize( "", on )