Next: 4. Notes on supported Up: 3. Using SDCC Previous: 3.18 Pragmas Contents Index

# 3.19 Defines Created by the Compiler

The compiler creates the following #defines:

#define | Description
--- | ---
SDCC | Always defined. Since version 2.5.6 the version number as an int (ex. 256)
SDCC_mcs51 or SDCC_ds390 or SDCC_z80, etc. | depending on the model used (e.g.: -mds390)
__mcs51, __ds390, __hc08, __z80, etc | depending on the model used (e.g. -mz80)
SDCC_STACK_AUTO | when --stack-auto option is used
SDCC_MODEL_SMALL | when --model-small is used
SDCC_MODEL_MEDIUM | when --model-medium is used
SDCC_MODEL_LARGE | when --model-large is used
SDCC_USE_XSTACK | when --xstack option is used
SDCC_STACK_TENBIT | when -mds390 is used
SDCC_MODEL_FLAT24 | when -mds390 is used
SDCC_REVISION | Always defined. SDCC svn revision number
SDCC_PARMS_IN_BANK1 | when --parms-in-bank1 is used
SDCC_FLOAT_REENT | when --float-reent is used
SDCC_INT_LONG_REENT | when --int-long-reent is used

Next: 4. Notes on supported Up: 3. Using SDCC Previous: 3.18 Pragmas Contents Index