-
Notifications
You must be signed in to change notification settings - Fork 5
Predefined Macros for Code
Erik Rainey edited this page Feb 27, 2015
·
2 revisions
Predefined Macros for Use in Programs Compiled with Concerto:
TARGET_BUILD (1 = release, 2 = debug, 3 = profiling)
TARGET_PLATFORM will be assigned (PC, DEVBOARD)
TARGET_OS will resolve to one of (LINUX, DARWIN, Windows_NT, CYGWIN, WIN32)
TARGET_CPU will resolve to the model/arch of the CPU (armv7)
TARGET_CPU_FAMILY will resolve to (ARM, X86)
__GNUC__ = Gnu C Compiler
__clang__ = Clang Compiler (will have __GNUC__ defined too)
__TI_ARM__ = TI ARM Compiler
_MSC_VER = Microsoft Compiler
__TMS320C6X__ = TI C6x Compiler
__ARP32__ = TI ARP Compiler
_WIN32 = Windows NT, later, 32 bit
_WIN64 = Windows 64 bit
__linux__ = Linux
__CYGWIN__ = Cygwin
__QNX__ = QNX
__ANDROID__ = Android (will also have __linux__)
__APPLE__ = MacOSX (will also have __MACH__)
__unix__ = A Unix-like Environment
__cplusplus == 201103L (C++11)
__STDC__ == C89 or later (not defined on Windows)
(__STDC_VERSION__ == 199901L) = C99
__amd64__ = AMD64 Extensions
__x86_64__ = x86 64 bit extensions
_M_X64 = 64 bit X86
_M_X86 = 32 bit X86
_M_ARM = 32 bit ARM