OPTIMIZE_CALC_CONSTS

Previous Advanced Options of TIGCC Next

If you are compiling a program for more than one calculator, you can put

#define OPTIMIZE_CALC_CONSTS
at the beginning of the program to optimize code speed and size. This will affect PSEUDO_CONST_CALC and everything derived from it - mainly pseudo-constants from compat.h, but you can also define your own pseudo-constants very easily.

Defining this does have one drawback: Each of the executable files produced by the linker can only be run on the calculator it was linked for and cannot be transferred from one type of calculator to another. A check to make sure the program is not run on a wrong calculator is inserted automatically, unless NO_CALC_DETECT is defined.

This feature uses the linker-specific symbol __ld_calc_const_....