User Tools

Site Tools


code_pragmas_1.htm
Navigation:  Advanced Topics > Legacy Project System Reference >====== Code #pragmas ====== Previous pageReturn to chapter overviewNext page

#pragmas with the class name code control internal code generation optimizations.

The following code #pragmas are available:

#pragma code(opt_var_arg ⇒ on | off)

#pragma code(standard_float ⇒ on | off)

NoteBox.jpg

A pragma can be used in the Project language, C++ code, Modula-2 code, or Clarion code. Some only work in certain places. A 'P' to the right of the pragma indicates it can be used in the Project language, a 'C' indicates it can be used in C++ code, a 'M' indicates it can be used in Modula-2 code, and a 'W' indicates that it can be used in Clarion code (CLW files).

#pragma code(opt_var_arg ⇒ on | off)   w

If value of this pragma is “on” (default value) the compiler performs additional optimization for the procedure stack frame for variable parameters. This pragma must always be set to “on”.

#pragma code(standard_float ⇒ on | off )   w

If value of this pragma is “off” (default), the compiler generates the code to save some FPU registers (the exact list is dependent on values of other pragmas, procedure type (normal or ROUTINE), etc.) on the entry to procedure and restore them on exit, if the procedure is using them. Otherwise, values of FPU registers are not saved in the procedure.

code_pragmas_1.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1