| |||
| Home > ARM Compiler Reference > Predefined macros | |||
Table 3.9 lists
the macro names predefined by the ARM C and C++ compilers. Where the
value field is empty, the symbol concerned is merely defined, as
though by (for example) -D__arm on the command
line.
Table 3.9. Predefined macros
| Name | Value | Notes |
|---|---|---|
__STDC__ | 1 | defined in all compiler modes except PCC mode |
__cplusplus | 1 | defined in C++ compiler mode |
__CFRONT_LIKE | 1 | defined in -cfront compiler
mode |
__arm | defined if using armcc, tcc, armcpp , or tcpp | |
__thumb | defined if using tcc or tcpp | |
__SOFTFP__ | defined if compiling to use the software floating-point
library (-apcs /softfp) | |
__APCS_NOSWST | defined if -apcs /noswst in
use | |
__APCS_REENT | defined if -apcs /reent in
use | |
__APCS_INTERWORK | defined if -apcs /interwork in
use | |
__APCS_32 | defined unless -apcs /26bit is
in use | |
__APCS_NOFP | defined if -apcs /nofp in
use (no frame pointer) | |
__APCS_FPREGARGS | defined if -apcs /fpregargs is
in use | |
__BIG_ENDIAN | defined if compiling for a big-endian target | |
__DIALECT_FUSSY | defined if -fussy is specified. | |
__DIALECT_PCC | defined if -pcc is specified. | |
__TARGET_ARCH_ | xx represents the
target architecture. The value of xx depends
on the target architecture. For example, if the compiler options -arch
4T or -cpu ARM7TDMI are specified then __TARGET_ARCH_4T is
defined, and no other symbol starting with _TARGET_ARCH_ is
defined. | |
__TARGET_CPU_ |
If the target architecture only is specified,
without a target CPU then If the processor name contains hyphen (-) characters,
these are mapped to an underscore ( | |
__TARGET_FEATURE_HALFWORD | defined if the target architecture supports halfword and signed byte access instructions. | |
__TARGET_FEATURE_MULTIPLY | defined if the target architecture supports
the long multiply instructions MULL and MULAL. | |
__TARGET_FEATURE_THUMB | defined if the target architecture is Thumb-aware. | |
__ARMCC_VERSION | Gives the version number of the compiler. The value is the same for armcc and tcc; it is a decimal number, whose value can be relied on to increase monotonically between releases. | |
__CLK_TCK | 100 | centisecond clock definition |
__sizeof_int | 4 | sizeof(int), but available
in preprocessor expressions |
__sizeof_long | 4 | sizeof(long), but available
in preprocessor expressions |
__sizeof_ptr | 4 | sizeof(void *), but available
in preprocessor expressions |
__FILE__ | the presumed full pathname of the current source file | |
__MODULE__ | contains the filename part of the value of __FILE__ | |
__LINE__ | the line number of the current source file | |
__DATE__ | the date of translation of the source file | |
__TIME__ | the time of translation of the source file |