2015-11-19 07:07:49 +00:00
|
|
|
/*
|
|
|
|
* This file is subject to the terms of the GFX License. If a copy of
|
|
|
|
* the license was not distributed with this file, you can obtain one at:
|
|
|
|
*
|
2018-10-01 15:32:39 +00:00
|
|
|
* http://ugfx.io/license.html
|
2015-11-19 07:07:49 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file gfx_compilers.h
|
|
|
|
* @brief GFX compiler support header file.
|
|
|
|
*
|
|
|
|
* @addtogroup GFX
|
|
|
|
*
|
|
|
|
* @brief Main module to glue all the others together
|
|
|
|
*
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _GFX_COMPILERS_H
|
|
|
|
#define _GFX_COMPILERS_H
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @name GFX compilation options
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* @brief Should various inline ugfx functions be non-inline.
|
2018-02-27 07:44:21 +00:00
|
|
|
* @details Defaults to GFXOFF
|
|
|
|
* @note Generally there is no need to set this to GFXON as it will have huge performance impacts
|
2015-11-19 07:07:49 +00:00
|
|
|
* in the driver level.
|
|
|
|
*/
|
|
|
|
#ifndef GFX_NO_INLINE
|
2018-02-27 07:44:21 +00:00
|
|
|
#define GFX_NO_INLINE GFXOFF
|
2015-11-19 07:07:49 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
// Set the no inline value
|
|
|
|
#if GFX_NO_INLINE
|
|
|
|
#define GFXINLINE
|
|
|
|
#endif
|
|
|
|
|
2016-12-06 02:15:13 +00:00
|
|
|
/**
|
|
|
|
* @brief Show which compiler we detected as a compiler warning message
|
|
|
|
*/
|
|
|
|
#ifndef GFX_SHOW_COMPILER
|
2018-02-27 07:44:21 +00:00
|
|
|
#define GFX_SHOW_COMPILER GFXOFF
|
2016-12-06 02:15:13 +00:00
|
|
|
#endif
|
|
|
|
|
2015-11-19 07:07:49 +00:00
|
|
|
/**
|
|
|
|
* @brief Enable compiler specific code
|
|
|
|
* @details Auto detected by default but it can be overridden in gfxconf.h
|
|
|
|
* @note This is setting enables optimisations and code options that are compiler specific.
|
|
|
|
* @note If the compiler can't be auto-detected it is set to GFX_COMPILER_UNKNOWN
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
#ifndef GFX_COMPILER
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_UNKNOWN
|
|
|
|
#endif
|
|
|
|
#define GFX_COMPILER_UNKNOWN 0 //**< Unknown compiler
|
|
|
|
#define GFX_COMPILER_ACC 1 //**< ACC Compiler
|
|
|
|
#define GFX_COMPILER_ALTIUM 2 //**< Altium MicroBlaze C
|
|
|
|
#define GFX_COMPILER_ALTIUMHW 3 //**< Altium C-to-Hardware
|
|
|
|
#define GFX_COMPILER_AMSTERDAM 4 //**< Amsterdam Compiler Kit
|
|
|
|
#define GFX_COMPILER_ARMCC 5 //**< ARM Compiler
|
|
|
|
#define GFX_COMPILER_AZTEC 6 //**< Aztec C
|
|
|
|
#define GFX_COMPILER_BORLAND 7 //**< Borland C++
|
|
|
|
#define GFX_COMPILER_CC65 8 //**< CC65
|
|
|
|
#define GFX_COMPILER_CLANG 9 //**< CLang (LLVM) compiler
|
|
|
|
#define GFX_COMPILER_COMEAU 10 //**< Comeau C++
|
|
|
|
#define GFX_COMPILER_COMPAQ 11 //**< Compaq C
|
|
|
|
#define GFX_COMPILER_COMPCERT 12 //**< Compcert Compiler
|
|
|
|
#define GFX_COMPILER_CONVEX 13 //**< Convex C
|
|
|
|
#define GFX_COMPILER_CRAY 14 //**< Cray C/C++
|
|
|
|
#define GFX_COMPILER_CYGWIN 15 //**< Cygwin (x86) unix emulator compiler for windows
|
|
|
|
#define GFX_COMPILER_DAIB 16 //**< Diab C/C++
|
|
|
|
#define GFX_COMPILER_DEC 17 //**< The older DEC C Compiler
|
|
|
|
#define GFX_COMPILER_DICE 18 //**< DICE C Compiler
|
|
|
|
#define GFX_COMPILER_DIGNUS 19 //**< Dignus Systems C++ Compiler
|
|
|
|
#define GFX_COMPILER_DJGPP 20 //**< DJGPP
|
|
|
|
#define GFX_COMPILER_DMARS 21 //**< Digital Mars
|
|
|
|
#define GFX_COMPILER_EDG 22 //**< EDG C++
|
|
|
|
#define GFX_COMPILER_EKOPATH 23 //**< EKOPath Compiler
|
|
|
|
#define GFX_COMPILER_FUJITSU 24 //**< Fujitsu C++ Compiler
|
|
|
|
#define GFX_COMPILER_GCC 25 //**< Standard GCC/G++
|
|
|
|
#define GFX_COMPILER_GREENHILL 26 //**< Green Hill C/C++
|
|
|
|
#define GFX_COMPILER_HIGHC 27 //**< Metaware High C/C++
|
|
|
|
#define GFX_COMPILER_HP 28 //**< HP C/aC++
|
|
|
|
#define GFX_COMPILER_IAR 29 //**< IAR C/C++
|
|
|
|
#define GFX_COMPILER_IBMXL 30 //**< IBM XL C/C++ Compiler
|
|
|
|
#define GFX_COMPILER_IMAGECRAFT 31 //**< ImageCraft C Compiler
|
|
|
|
#define GFX_COMPILER_INTEL 32 //**< Intel ICC/ICPC Compiler
|
|
|
|
#define GFX_COMPILER_KAI 33 //**< Kai C++
|
|
|
|
#define GFX_COMPILER_KEIL 34 //**< Keil (use this when working with uVision IDE)
|
|
|
|
#define GFX_COMPILER_LCC 35 //**< LCC
|
|
|
|
#define GFX_COMPILER_METROWORKS 36 //**< Metroworks
|
|
|
|
#define GFX_COMPILER_MICROTEC 37 //**< Microtec C/C++
|
|
|
|
#define GFX_COMPILER_MICROWAY 38 //**< Microway NDP C
|
|
|
|
#define GFX_COMPILER_MINGW32 39 //**< MingW32 (x86) compiler for windows
|
|
|
|
#define GFX_COMPILER_MINGW64 40 //**< MingW64 (x64) compiler for windows
|
|
|
|
#define GFX_COMPILER_MIPSPRO 41 //**< MIPS Pro
|
|
|
|
#define GFX_COMPILER_MIRACLE 42 //**< Miracle C
|
|
|
|
#define GFX_COMPILER_MPW 43 //**< MPW C++
|
|
|
|
#define GFX_COMPILER_NORCROFT 44 //**< Norcroft ARM
|
|
|
|
#define GFX_COMPILER_NWCC 45 //**< NWCC
|
|
|
|
#define GFX_COMPILER_OPEN64 46 //**< Open64
|
|
|
|
#define GFX_COMPILER_OSS 47 //**< Oracle Solaris Studio
|
|
|
|
#define GFX_COMPILER_PACIFIC 48 //**< Pacific C
|
|
|
|
#define GFX_COMPILER_PALM 49 //**< Palm C/C++
|
|
|
|
#define GFX_COMPILER_PELLES 50 //**< Pelles C
|
|
|
|
#define GFX_COMPILER_PGCC 51 //**< Portland PGCC/PGCPP
|
|
|
|
#define GFX_COMPILER_RENESAS 52 //**< Renesas C/C++
|
|
|
|
#define GFX_COMPILER_SASC 53 //**< SAS/C
|
|
|
|
#define GFX_COMPILER_SCO 54 //**< SCO OpenServer
|
|
|
|
#define GFX_COMPILER_SDCC 55 //**< Small Device C Compiler
|
|
|
|
#define GFX_COMPILER_SN 56 //**< SN Compiler
|
|
|
|
#define GFX_COMPILER_STRATUS 57 //**< Stratus VOS C
|
|
|
|
#define GFX_COMPILER_SYMANTEC 58 //**< Symantec C++
|
|
|
|
#define GFX_COMPILER_TENDRA 59 //**< TenDRA C/C++
|
|
|
|
#define GFX_COMPILER_THINK 60 //**< Think C
|
|
|
|
#define GFX_COMPILER_TI 61 //**< Texas Instruments C/C++
|
|
|
|
#define GFX_COMPILER_TINYC 62 //**< Tiny C
|
|
|
|
#define GFX_COMPILER_TURBOC 63 //**< Borland Turbo C
|
|
|
|
#define GFX_COMPILER_ULTIMATE 64 //**< Ultimate C/C++
|
|
|
|
#define GFX_COMPILER_USL 65 //**< USL C
|
|
|
|
#define GFX_COMPILER_VBCC 66 //**< VBCC
|
|
|
|
#define GFX_COMPILER_VS 67 //**< Microsoft Visual Studio
|
|
|
|
#define GFX_COMPILER_WATCOM 68 //**< Watcom
|
|
|
|
#define GFX_COMPILER_ZTC 69 //**< Zortech C++
|
|
|
|
/** @} */
|
|
|
|
|
|
|
|
/************************************ Start Compiler Auto-Detection *************************
|
|
|
|
*
|
|
|
|
* Do not alter the order of these unless you know what you are doing as some compilers try
|
|
|
|
* to emulate other compilers. GCC in particular is commonly emulated and is also used as
|
|
|
|
* a code base for other compiler variants.
|
|
|
|
*/
|
|
|
|
#if GFX_COMPILER == GFX_COMPILER_UNKNOWN
|
|
|
|
#undef GFX_COMPILER
|
|
|
|
#if defined(__MINGW32__)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_MINGW32
|
|
|
|
#elif defined(__MINGW64__)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_MINGW64
|
|
|
|
#elif defined(__CYGWIN__)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_CYGWIN
|
|
|
|
#elif defined(__KEIL__) || defined(__CA__) || defined(__C51__) || defined(__CX51__) || defined(__C166__) || defined(__C251__) \
|
|
|
|
|| (defined(__CC_ARM) && defined(__EDG__))
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_KEIL
|
|
|
|
#elif defined(__clang__) || defined(__llvm__)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_CLANG
|
|
|
|
#elif defined(__INTEL_COMPILER) || defined(__ICC) || defined(__ECC) || defined(__TCL)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_INTEL
|
|
|
|
#elif defined(__GNUC__) || defined(__GNUG__)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_GCC
|
|
|
|
#elif defined(__CC_ARM)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_ARMCC
|
|
|
|
#elif defined(__HP_cc) || defined(__HP_aCC)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_HP
|
|
|
|
#elif defined(__IBMC__) || defined(__IBMCPP__) || defined(__xlc__) || defined(__xlC__)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_IBMXL
|
|
|
|
#elif defined(_MSC_VER)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_VS
|
|
|
|
#elif defined(__PGI)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_PGCC
|
|
|
|
#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_OSS
|
|
|
|
#elif defined(__TURBOC__)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_TURBOC
|
|
|
|
#elif defined(__BORLANDC__)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_BORLAND
|
|
|
|
#elif defined(__COMO__)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_COMEAU
|
|
|
|
#elif defined(__DECC) || defined(__VAXC) || defined(VAXC) || defined(__DECCXX)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_COMPAQ
|
|
|
|
#elif defined(__osf__) && defined(__LANGUAGE_C__)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_DEC
|
|
|
|
#elif defined(_CRAYC)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_CRAY
|
|
|
|
#elif defined(__DCC__)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_DAIB
|
|
|
|
#elif defined(__DMC__)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_DMARS
|
|
|
|
#elif defined(__KCC)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_KAI
|
|
|
|
#elif defined(__LCC__)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_LCC
|
|
|
|
#elif defined(__HIGHC__)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_HIGHC
|
|
|
|
#elif defined(__MWERKS__) || defined(__CWCC__)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_METROWORKS
|
|
|
|
#elif defined(__sgi)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_MIPSPRO
|
|
|
|
#elif defined(__MRC__)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_MPW
|
|
|
|
#elif defined(__CC_NORCROFT)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_NORCROFT
|
|
|
|
#elif defined(__SASC__)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_SASC
|
|
|
|
#elif defined( _SCO_DS )
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_SCO
|
|
|
|
#elif defined(__TINYC__)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_TINYC
|
|
|
|
#elif defined( __USLC__ )
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_USL
|
|
|
|
#elif defined(__WATCOMC__)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_WATCOM
|
|
|
|
#elif defined(__AZTEC_C__) || defined(AZTEC_C)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_AZTEC
|
|
|
|
#elif defined(__CC65__)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_CC65
|
|
|
|
#elif defined(__convexc__)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_CONVEX
|
|
|
|
#elif defined(__COMPCERT__)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_COMPCERT
|
|
|
|
#elif defined(_DICE)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_DICE
|
|
|
|
#elif defined(__SYSC__)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_DIGNUS
|
|
|
|
#elif defined(__DJGPP__) || defined(__GO32__)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_DJGPP
|
|
|
|
#elif defined(__EDG__)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_EDG
|
|
|
|
#elif defined(__PATHCC__)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_EKOPATH
|
|
|
|
#elif defined(__FCC_VERSION)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_FUJITSU
|
|
|
|
#elif defined(__ghs__)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_GREENHILL
|
|
|
|
#elif defined(__IAR_SYSTEMS_ICC__)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_IAR
|
|
|
|
#elif defined(_MRI)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_MICROTEC
|
|
|
|
#elif defined(__NDPC__) || defined(__NDPX__)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_MICROWAY
|
|
|
|
#elif defined(MIRACLE)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_MIRACLE
|
|
|
|
#elif defined(__NWCC__)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_NWCC
|
|
|
|
#elif defined(__OPEN64__)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_OPEN64
|
|
|
|
#elif defined(__PACIFIC__)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_PACIFIC
|
|
|
|
#elif defined(_PACC_VER)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_PALM
|
|
|
|
#elif defined(__POCC__)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_PELLES
|
|
|
|
#elif defined(__RENESAS__) || defined(__HITACHI__)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_RENESAS
|
|
|
|
#elif defined(SDCC)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_SDCC
|
|
|
|
#elif defined(__SNC__)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_SN
|
|
|
|
#elif defined(__VOSC__)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_STRATUS
|
|
|
|
#elif defined(__TenDRA__)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_TENDRA
|
|
|
|
#elif defined(__TI_COMPILER_VERSION__)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_TI
|
|
|
|
#elif defined(THINKC3) || defined(THINKC4)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_THINK
|
|
|
|
#elif defined(_UCC)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_ULTIMATE
|
|
|
|
#elif defined(__VBCC__)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_VBCC
|
|
|
|
#elif defined(__ZTC__)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_ZTC
|
|
|
|
#elif defined(__SC__)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_SYMANTEC
|
|
|
|
#elif defined(_ACC_)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_ACC
|
|
|
|
#elif defined(__CMB__)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_ALTIUM
|
|
|
|
#elif defined(__CHC__)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_ALTIUMHW
|
|
|
|
#elif defined(__ACK__)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_AMSTERDAM
|
|
|
|
#elif defined(__IMAGECRAFT__)
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_IMAGECRAFT
|
|
|
|
|
|
|
|
#else
|
|
|
|
#define GFX_COMPILER GFX_COMPILER_UNKNOWN
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
/************************************ End Compiler Auto-Detection *************************/
|
|
|
|
|
|
|
|
/************************************ Start Compiler Settings *****************************
|
|
|
|
*
|
|
|
|
* Please keep this list in alphabetical order to keep it easier to maintain
|
|
|
|
*/
|
2017-06-30 09:43:51 +00:00
|
|
|
|
2015-11-19 07:07:49 +00:00
|
|
|
#undef GFX_COMPILER_NAME
|
|
|
|
#undef GFX_COMPILER_TESTED
|
|
|
|
#undef GFX_COMPILER_VERSION_MAJOR
|
|
|
|
#undef GFX_COMPILER_VERSION_MINOR
|
|
|
|
#undef GFX_COMPILER_VERSION_PATCH
|
|
|
|
#undef GFX_COMPILER_VERSION_BUILD
|
2017-06-30 09:43:51 +00:00
|
|
|
#undef GFX_COMPILER_WARNING_TYPE
|
|
|
|
#define GFX_COMPILER_WARNING_NONE 0 /* Don't display warnings */
|
|
|
|
#define GFX_COMPILER_WARNING_DIRECT 1 /* Use #warning text, no macro expansion possible */
|
|
|
|
#define GFX_COMPILER_WARNING_MACRO 2 /* Use COMPILER_WARNING(text), macro expansion possible */
|
|
|
|
#define GFX_COMPILER_WARNING_GCC 3 /* Use GCC style warnings - converted to GFX_COMPILER_WARNING_MACRO */
|
|
|
|
|
2015-11-19 07:07:49 +00:00
|
|
|
#if GFX_COMPILER == GFX_COMPILER_ACC
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: ACC"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "ACC"
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_ALTIUM
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: ALTIUM"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "Altium MicroBlaze C"
|
|
|
|
#ifdef __BUILD__
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((__BUILD__)/1000000)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (((__BUILD__)/1000)%1000)
|
|
|
|
#define GFX_COMPILER_VERSION_PATCH ((__BUILD__)%1000)
|
|
|
|
#else
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((__VERSION__)/1000)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR ((__VERSION__)%1000)
|
|
|
|
#define GFX_COMPILER_VERSION_PATCH (__REVISION__)
|
|
|
|
#endif
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_ALTIUMHW
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: ALTIUMHW"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "Altium C-to-Hardware"
|
|
|
|
#ifdef __BUILD__
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((__BUILD__)/1000000)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (((__BUILD__)/1000)%1000)
|
|
|
|
#define GFX_COMPILER_VERSION_PATCH ((__BUILD__)%1000)
|
|
|
|
#else
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((__VERSION__)/1000)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR ((__VERSION__)%1000)
|
|
|
|
#define GFX_COMPILER_VERSION_PATCH (__REVISION__)
|
|
|
|
#endif
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_AMSTERDAM
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: AMSTERDAM"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "Amsterdam Compiler Kit"
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_ARMCC
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: ARMCC"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "ARMCC"
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((__ARMCC_VERSION)/100000)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (((__ARMCC_VERSION)/10000)%10)
|
|
|
|
#define GFX_COMPILER_VERSION_PATCH (((__ARMCC_VERSION)/1000)%10)
|
|
|
|
#define GFX_COMPILER_VERSION_BUILD ((__ARMCC_VERSION)%1000)
|
2017-06-30 09:43:51 +00:00
|
|
|
#pragma anon_unions // Allow anonymous unions
|
2015-11-19 07:07:49 +00:00
|
|
|
#define __LITTLE_IF_NOT_BIG__ // Oops - Defines __BIG_ENDIAN but not __LITTLE_ENDIAN
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_AZTEC
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: AZTEC"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "Aztec"
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((__VERSION)/100)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR ((__VERSION)%100)
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_BORLAND
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: BORLAND"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "Borland C++"
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((__BORLANDC__)/0x100)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (((((__BORLANDC__)%0x100)/0x10)*10) + ((__BORLANDC__)%0x10))
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_CC65
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: CC65"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "CC65"
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((__CC65__)/0x100)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (((__CC65__)/0x10)%0x10)
|
|
|
|
#define GFX_COMPILER_VERSION_PATCH ((__CC65__)%0x10)
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_CLANG
|
|
|
|
#define GFX_COMPILER_NAME "CLang (LLVM)"
|
2018-02-27 07:44:21 +00:00
|
|
|
#define GFX_COMPILER_TESTED GFXON
|
2017-06-30 09:43:51 +00:00
|
|
|
#define GFX_COMPILER_WARNING_TYPE GFX_COMPILER_WARNING_GCC
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_VERSION_MAJOR (__clang_major__)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (__clang_minor__)
|
2016-08-20 14:54:48 +00:00
|
|
|
#define GFX_COMPILER_VERSION_PATCH (__clang_patchlevel__)
|
2016-08-13 18:05:49 +00:00
|
|
|
#define DEPRECATED(msg) __attribute__((deprecated(msg)))
|
2015-11-19 07:07:49 +00:00
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_COMEAU
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: COMEAU"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "Comeau C++"
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((__COMO_VERSION__)/100)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR ((__COMO_VERSION__)%100)
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_COMPAQ
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: COMPAQ"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "Compaq C"
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((__DECC_VER)/10000000)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (((__DECC_VER)/100000)%100)
|
|
|
|
#define GFX_COMPILER_VERSION_PATCH ((__DECC_VER)%10000)
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_COMPCERT
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: COMPCERT"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "Compcert"
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_CONVEX
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: CONVEX"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "Convex C"
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_CRAY
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: CRAY"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "Cray C/C++"
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR (_RELEASE)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (_RELEASE_MINOR)
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_CYGWIN
|
|
|
|
#define GFX_COMPILER_NAME "Cygwin"
|
2018-02-27 07:44:21 +00:00
|
|
|
#define GFX_COMPILER_TESTED GFXON
|
2017-06-30 09:43:51 +00:00
|
|
|
#define GFX_COMPILER_WARNING_TYPE GFX_COMPILER_WARNING_GCC
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_VERSION_MAJOR (__GNUC__)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (__GNUC_MINOR__)
|
|
|
|
#ifdef __GNUC_PATCHLEVEL__
|
|
|
|
#define GFX_COMPILER_VERSION_PATCH (__GNUC_PATCHLEVEL__)
|
|
|
|
#endif
|
|
|
|
#define DEPRECATED(msg) __attribute__((deprecated(msg)))
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_DAIB
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: DAIB"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "Diab C/C++"
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((__VERSION_NUMBER__)/1000)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (((__VERSION_NUMBER__)/100)%10)
|
|
|
|
#define GFX_COMPILER_VERSION_PATCH ((__VERSION_NUMBER__)%100)
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_DEC
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: DEC"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "DEC"
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_DICE
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: DICE"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "DICE C"
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_DIGNUS
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: DIGNUS"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "Dignus Systems C++"
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((__SYSC_VER__)/10000)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (((__SYSC_VER__)/100)%100)
|
|
|
|
#define GFX_COMPILER_VERSION_PATCH ((__SYSC_VER__)%100)
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_DJGPP
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: DJGPP"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "DJGPP"
|
|
|
|
#ifdef __DJGPP__
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR (__DJGPP__)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (__DJGPP_MINOR__)
|
|
|
|
#else
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR (1)
|
|
|
|
#endif
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_DMARS
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: DMARS"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "Digital Mars"
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((__DMC__)/0x100)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (((__DMC__)/0x10)%0x10)
|
|
|
|
#define GFX_COMPILER_VERSION_PATCH ((__DMC__)%0x10)
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_EDG
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: EDG"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "EDG C++"
|
2018-02-27 07:44:21 +00:00
|
|
|
#define GFX_COMPILER_TESTED GFXON
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((__EDG_VERSION__)/100)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR ((__EDG_VERSION__)%100)
|
2016-07-26 23:03:03 +00:00
|
|
|
#pragma diag_remark = Pe301
|
|
|
|
#pragma diag_remark = Pe083
|
|
|
|
#pragma diag_remark = Pe767
|
|
|
|
#pragma diag_remark = Pe188
|
|
|
|
#pragma diag_remark = Pe186
|
|
|
|
#pragma diag_remark = Pe068
|
|
|
|
#pragma diag_remark = Pa050
|
2015-11-19 07:07:49 +00:00
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_EKOPATH
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: EKOPATH"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "EKOPath"
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR (__PATHCC__)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (__PATHCC_MINOR__)
|
|
|
|
#define GFX_COMPILER_VERSION_PATCH (__PATHCC_PATCHLEVEL__)
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_FUJITSU
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: FUJITSU"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "Fujitsu C++"
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_GCC
|
|
|
|
#define GFX_COMPILER_NAME "GCC"
|
2018-02-27 07:44:21 +00:00
|
|
|
#define GFX_COMPILER_TESTED GFXON
|
2017-06-30 09:43:51 +00:00
|
|
|
#define GFX_COMPILER_WARNING_TYPE GFX_COMPILER_WARNING_GCC
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_VERSION_MAJOR (__GNUC__)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (__GNUC_MINOR__)
|
|
|
|
#ifdef __GNUC_PATCHLEVEL__
|
|
|
|
#define GFX_COMPILER_VERSION_PATCH (__GNUC_PATCHLEVEL__)
|
|
|
|
#endif
|
|
|
|
#define DEPRECATED(msg) __attribute__((deprecated(msg)))
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_GREENHILL
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: GREENHILL"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "Green Hill C/C++"
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((__GHS_VERSION_NUMBER__)/100)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (((__GHS_VERSION_NUMBER__)/10)%10)
|
|
|
|
#define GFX_COMPILER_VERSION_PATCH ((__GHS_VERSION_NUMBER__)%10)
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_HIGHC
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: HIGHC"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "Metaware High C/C++"
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_HP
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: HP"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "HP C/aC++"
|
|
|
|
#ifdef __HP_aCC
|
|
|
|
#if __HP_aCC == 1
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR (1)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (15)
|
|
|
|
#else
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((__HP_aCC)/10000)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (((__HP_aCC)/100)%100)
|
|
|
|
#define GFX_COMPILER_VERSION_PATCH ((__HP_aCC)%100)
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_IAR
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: IAR"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "IAR C++"
|
2018-02-27 07:44:21 +00:00
|
|
|
#define GFX_COMPILER_TESTED GFXON
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((__VER__)/100)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR ((__VER__)%100)
|
2016-07-26 23:03:03 +00:00
|
|
|
#pragma diag_remark = Pe301
|
|
|
|
#pragma diag_remark = Pe083
|
|
|
|
#pragma diag_remark = Pe767
|
|
|
|
#pragma diag_remark = Pe188
|
|
|
|
#pragma diag_remark = Pe186
|
|
|
|
#pragma diag_remark = Pe068
|
|
|
|
#pragma diag_remark = Pa050
|
2015-11-19 07:07:49 +00:00
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_IBMXL
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: IBMXL"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "IBM XL C/C++"
|
|
|
|
#ifdef __xlC__
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((__xlC__)/0x100)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR ((__xlC__)%0x100)
|
|
|
|
#define GFX_COMPILER_VERSION_PATCH ((__xlC_ver__)/0x100)
|
|
|
|
#define GFX_COMPILER_VERSION_BUILD ((__xlC_ver__)%0x100)
|
|
|
|
#elif defined(__COMPILER_VER__)
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR (((__COMPILER_VER__)/0x1000000)%0x10)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (((__COMPILER_VER__)/0x10000)%0x100)
|
|
|
|
#define GFX_COMPILER_VERSION_PATCH ((__COMPILER_VER__)/0x10000)
|
|
|
|
#elif defined(__IBMC__)
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((__IBMC__)/100)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (((__IBMC__)/10)%10)
|
|
|
|
#define GFX_COMPILER_VERSION_PATCH ((__IBMC__)%10)
|
|
|
|
#elif defined(__IBMCPP__)
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((__IBMCPP__)/100)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (((__IBMCPP__)/10)%10)
|
|
|
|
#define GFX_COMPILER_VERSION_PATCH ((__IBMCPP__)%10)
|
|
|
|
#endif
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_IMAGECRAFT
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: IMAGECRAFT"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "Imagecraft C"
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_INTEL
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: INTEL"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "Intel ICC/ICPC"
|
|
|
|
#ifdef __INTEL_COMPILER
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((__INTEL_COMPILER)/100)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (((__INTEL_COMPILER)/10)%10)
|
|
|
|
#define GFX_COMPILER_VERSION_PATCH ((__INTEL_COMPILER)%10)
|
|
|
|
#ifdef __INTEL_COMPILER_BUILD_DATE
|
|
|
|
#define GFX_COMPILER_VERSION_BUILD (__INTEL_COMPILER_BUILD_DATE)
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_KAI
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: KAI"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "Kai C++"
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((__KCC_VERSION)/0x1000)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (((__KCC_VERSION)/0x100)%0x10)
|
|
|
|
#define GFX_COMPILER_VERSION_PATCH ((__KCC_VERSION)%0x100)
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_KEIL
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: KEIL"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "Keil"
|
2018-02-27 07:44:21 +00:00
|
|
|
#define GFX_COMPILER_TESTED GFXON
|
2015-11-19 07:07:49 +00:00
|
|
|
#if defined(__ARMCC_VERSION)
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((__ARMCC_VERSION)/1000000)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (((__ARMCC_VERSION)/10000)%100)
|
|
|
|
#define GFX_COMPILER_VERSION_PATCH ((__ARMCC_VERSION)%10000)
|
|
|
|
#ifdef __EDG_VERSION__
|
|
|
|
#define GFX_COMPILER_VERSION_BUILD (__EDG_VERSION__)
|
|
|
|
#endif
|
|
|
|
#elif defined(__CA__)
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((__CA__)/100)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR ((__CA__)%100)
|
|
|
|
#elif defined(__C166__)
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((__C166__)/100)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR ((__C166__)%100)
|
|
|
|
#elif defined(__C51__)
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((__C51__)/100)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR ((__C51__)%100)
|
|
|
|
#elif defined(__C251__)
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((__C251__)/100)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR ((__C251__)%100)
|
|
|
|
#endif
|
|
|
|
#define DEPRECATED(msg) __attribute__((deprecated(msg)))
|
|
|
|
#pragma anon_unions // Allow anonymous unions
|
|
|
|
#pragma diag_remark 1293 // Turn off warning: assignment in condition
|
|
|
|
#pragma diag_remark 83 // Turn off warning: type qualifier specified more than once
|
|
|
|
#pragma diag_remark 767 // Turn off warning: conversion from pointer to smaller integer
|
|
|
|
#pragma diag_remark 188 // Turn off warning: enumerated type mixed with another type
|
2016-12-06 02:15:13 +00:00
|
|
|
#pragma diag_remark 68 // Turn off warning: integer conversion resulted in a change of sign
|
2016-12-14 14:05:45 +00:00
|
|
|
#pragma diag_remark 111 // Turn off warning: statement is unreachable
|
2015-11-19 07:07:49 +00:00
|
|
|
#ifndef GFXINLINE // Get the Keil definition for inline
|
|
|
|
#define GFXINLINE __inline
|
|
|
|
#endif
|
|
|
|
#define __LITTLE_IF_NOT_BIG__ // Oops - Defines __BIG_ENDIAN but not __LITTLE_ENDIAN
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_LCC
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: LCC"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "LCC"
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_METROWORKS
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: METROWORKS"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "Metroworks CodeWarrior"
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((__MWERKS__)/0x1000)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (((__MWERKS__)/0x100)%0x10)
|
|
|
|
#define GFX_COMPILER_VERSION_PATCH ((__MWERKS__)%100)
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_MICROTEC
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: MICROTEC"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "Microtec C/C++"
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_MICROWAY
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: MICROWAY"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "Microway NDP C"
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_MINGW32
|
|
|
|
#define GFX_COMPILER_NAME "MingW32"
|
2018-02-27 07:44:21 +00:00
|
|
|
#define GFX_COMPILER_TESTED GFXON
|
2017-06-30 09:43:51 +00:00
|
|
|
#define GFX_COMPILER_WARNING_TYPE GFX_COMPILER_WARNING_GCC
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_VERSION_MAJOR (__GNUC__)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (__GNUC_MINOR__)
|
|
|
|
#ifdef __GNUC_PATCHLEVEL__
|
|
|
|
#define GFX_COMPILER_VERSION_PATCH (__GNUC_PATCHLEVEL__)
|
|
|
|
#endif
|
|
|
|
#define DEPRECATED(msg) __attribute__((deprecated(msg)))
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_MINGW64
|
|
|
|
#define GFX_COMPILER_NAME "MingW64"
|
2017-06-30 09:43:51 +00:00
|
|
|
#define GFX_COMPILER_WARNING_TYPE GFX_COMPILER_WARNING_GCC
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_VERSION_MAJOR (__GNUC__)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (__GNUC_MINOR__)
|
|
|
|
#ifdef __GNUC_PATCHLEVEL__
|
|
|
|
#define GFX_COMPILER_VERSION_PATCH (__GNUC_PATCHLEVEL__)
|
|
|
|
#endif
|
|
|
|
#define DEPRECATED(msg) __attribute__((deprecated(msg)))
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_MIPSPRO
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: MIPSPRO"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "MIPS Pro"
|
|
|
|
#ifdef _SGI_COMPILER_VERSION
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((_SGI_COMPILER_VERSION)/100)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (((_SGI_COMPILER_VERSION)/10)%10)
|
|
|
|
#define GFX_COMPILER_VERSION_PATCH ((_SGI_COMPILER_VERSION)%10)
|
|
|
|
#else
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((_COMPILER_VERSION)/100)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (((_COMPILER_VERSION)/10)%10)
|
|
|
|
#define GFX_COMPILER_VERSION_PATCH ((_COMPILER_VERSION)%10)
|
|
|
|
#endif
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_MIRACLE
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: MIRACLE"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "Miracle C"
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_MPW
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: MPW"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "MPW C++"
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((__MRC__)/0x100)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR ((__MRC__)%0x100)
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_NORCROFT
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: NORCROFT"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "Norcroft C"
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_NWCC
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: NWCC"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "NWCC"
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_OPEN64
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: OPEN64"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "Open64"
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR (__OPENCC__)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (__OPENCC_MINOR__)
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_OSS
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: OSS"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "Oracle Solaris Studio"
|
|
|
|
#ifdef __SUNPRO_C >= 0x1000
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((__SUNPRO_C)/0x1000)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (((((__SUNPRO_C)/0x100)%0x10)*10) + (((__SUNPRO_C)/0x10)%10))
|
|
|
|
#define GFX_COMPILER_VERSION_PATCH ((__SUNPRO_C)%0x10)
|
|
|
|
#else
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((__SUNPRO_C)/0x100)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (((__SUNPRO_C)/0x10)%0x10)
|
|
|
|
#define GFX_COMPILER_VERSION_PATCH ((__SUNPRO_C)%0x10)
|
|
|
|
#endif
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_PACIFIC
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: PACIFIC"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "Pacific C"
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_PALM
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: PALM"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "Palm C/C++"
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((_PACC_VER)/0x10000000)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (((_PACC_VER)/0x100000)%0x100)
|
|
|
|
#define GFX_COMPILER_VERSION_PATCH (((_PACC_VER)/0x1000)%0x100)
|
|
|
|
#define GFX_COMPILER_VERSION_BUILD ((_PACC_VER)%0x1000)
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_PELLES
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: PELLES"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "Pelles C"
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((__POCC__)/100)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR ((__POCC__)%100)
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_PGCC
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: PGCC"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "Portland PGCC/PGCPP"
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR (__PGIC__)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (__PGIC_MINOR__)
|
|
|
|
#define GFX_COMPILER_VERSION_PATCH (__PGIC_PATCHLEVEL__)
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_RENESAS
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: RENESAS"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "Renesas C/C++"
|
|
|
|
#ifdef __HITACHI_VERSION__
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((__HITACHI_VERSION__)/0x100)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR ((__HITACHI_VERSION__)%0x100)
|
|
|
|
#elif __RENESAS_VERSION__ < 0x10000
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((__RENESAS_VERSION__)/0x100)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR ((__RENESAS_VERSION__)%0x100)
|
|
|
|
#else
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((__RENESAS_VERSION__)/0x1000000)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (((__RENESAS_VERSION__)/0x10000)%0x100)
|
|
|
|
#define GFX_COMPILER_VERSION_PATCH (((__RENESAS_VERSION__)/0x100)%0x100)
|
|
|
|
#define GFX_COMPILER_VERSION_BUILD ((__RENESAS_VERSION__)%0x100)
|
|
|
|
#endif
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_SASC
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: SASC"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "SAS/C"
|
|
|
|
#ifdef __SASC__
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((__SASC__)/100)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR ((__SASC__)%100)
|
|
|
|
#else
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR (__VERSION__)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (__REVISION__)
|
|
|
|
#endif
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_SCO
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: SCO"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "SCO OpenServer"
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_SDCC
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: SDCC"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "Small Device C"
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((SDCC)/100)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (((SDCC)/10)%10)
|
|
|
|
#define GFX_COMPILER_VERSION_PATCH ((SDCC)%10)
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_SN
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: SN"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "SN"
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_STRATUS
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: STRATUS"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "Stratus VOS C"
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR (__VOSC__)
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_SYMANTEC
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: SYMANTEC"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "Symantec C++"
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((__SC__)/0x100)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR ((__SC__)%0x100)
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_TENDRA
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: TENDRA"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "TenDRA C/C++"
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_THINK
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: THINK"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "Think C"
|
|
|
|
#ifdef THINKC4
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR (4)
|
|
|
|
#else
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR (3)
|
|
|
|
#endif
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_TI
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: TI"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "Texas Instruments C/C++"
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((SDCC)/1000000)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (((SDCC)/1000)%1000)
|
|
|
|
#define GFX_COMPILER_VERSION_PATCH ((SDCC)%1000)
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_TINYC
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: TINYC"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "Tiny C"
|
2018-02-27 07:44:21 +00:00
|
|
|
#define GFX_COMPILER_TESTED GFXON
|
2015-11-19 07:07:49 +00:00
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_TURBOC
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: TURBOC"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "Borland Turbo C/C++"
|
|
|
|
#if __TURBOC__ < 0x295 || __TURBOC__ >= 0x400
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((__TURBOC__)/0x100)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR ((__TURBOC__)%0x100)
|
|
|
|
#elif __TURBOC__ == 0x295
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR (1)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (0)
|
|
|
|
#elif __TURBOC__ == 0x296
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR (1)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (1)
|
|
|
|
#elif __TURBOC__ == 0x297
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR (2)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (0)
|
|
|
|
#endif
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_ULTIMATE
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: ULTIMATE"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "Ultimate C/C++"
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR (_MAJOR_REV)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (_MINOR_REV)
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_USL
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: USL"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "USL C"
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((__SCO_VERSION__)/100000000)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (((__SCO_VERSION__)/1000000)%100)
|
|
|
|
#define GFX_COMPILER_VERSION_BUILD ((__SCO_VERSION__)%1000000)
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_VBCC
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: VBCC"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "VBCC"
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_VS
|
|
|
|
#define GFX_COMPILER_NAME "Microsoft Visual Studio"
|
|
|
|
#ifdef _MSC_FULL_VER
|
|
|
|
#if _MSC_FULL_VER < 100000000
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((_MSC_FULL_VER)/1000000)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (((_MSC_FULL_VER)/10000)%100)
|
|
|
|
#define GFX_COMPILER_VERSION_PATCH (((_MSC_FULL_VER)/10000)%10000)
|
|
|
|
#else
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((_MSC_FULL_VER)/10000000)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (((_MSC_FULL_VER)/100000)%100)
|
|
|
|
#define GFX_COMPILER_VERSION_PATCH (((_MSC_FULL_VER)/100000)%10000)
|
|
|
|
#endif
|
|
|
|
#else
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((_MSC_VER)/100)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR ((_MSC_VER)%100)
|
|
|
|
#endif
|
|
|
|
#ifdef _MSC_BUILD
|
|
|
|
#define GFX_COMPILER_VERSION_BUILD (_MSC_BUILD)
|
|
|
|
#endif
|
|
|
|
#define DEPRECATED(msg) __declspec(deprecated(msg))
|
2017-06-30 09:43:51 +00:00
|
|
|
|
|
|
|
#define GFX_COMPILER_WARNING_TYPE GFX_COMPILER_WARNING_MACRO
|
|
|
|
#define COMPILER_WARNING(desc) __pragma(message(__FILE__ "(" GFXSTRX(__LINE__) "): warning uGFX: " desc))
|
2015-11-19 07:07:49 +00:00
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_WATCOM
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: WATCOM"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "Watcom C"
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((__WATCOMC__)/100)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR ((__WATCOMC__)%100)
|
|
|
|
#elif GFX_COMPILER == GFX_COMPILER_ZTC
|
2016-12-06 02:15:13 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#warning "Compiler: ZTC"
|
|
|
|
#endif
|
2015-11-19 07:07:49 +00:00
|
|
|
#define GFX_COMPILER_NAME "Zortech C++"
|
|
|
|
#define GFX_COMPILER_VERSION_MAJOR ((__ZTC__)/0x100)
|
|
|
|
#define GFX_COMPILER_VERSION_MINOR (((__ZTC__)/0x10)%0x10)
|
|
|
|
#define GFX_COMPILER_VERSION_PATCH ((__ZTC__)%0x10)
|
|
|
|
#endif
|
2017-06-30 09:43:51 +00:00
|
|
|
|
2015-11-19 07:07:49 +00:00
|
|
|
#ifndef GFX_COMPILER_TESTED
|
2018-02-27 07:44:21 +00:00
|
|
|
#define GFX_COMPILER_TESTED GFXOFF
|
2017-06-30 09:43:51 +00:00
|
|
|
#endif
|
|
|
|
#ifndef GFX_COMPILER_WARNING_TYPE
|
|
|
|
#define GFX_COMPILER_WARNING_TYPE GFX_COMPILER_WARNING_DIRECT
|
|
|
|
#elif GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_GCC
|
|
|
|
#undef GFX_COMPILER_WARNING_TYPE
|
|
|
|
#define GFX_COMPILER_WARNING_TYPE GFX_COMPILER_WARNING_MACRO
|
|
|
|
#define COMPILER_PRAGMA(x) _Pragma(#x)
|
|
|
|
#define COMPILER_WARNING(desc) COMPILER_PRAGMA(GCC warning desc)
|
2015-11-19 07:07:49 +00:00
|
|
|
#endif
|
|
|
|
/************************************ End Compiler Settings *************************/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief The name of the compiler set or auto-detected
|
|
|
|
* @details Read-Only
|
|
|
|
* @note If you successfully compile ugfx with an unknown compiler
|
|
|
|
* please report back to us via the ugfx forum so that we can add
|
|
|
|
* it to our list of compilers to detect.
|
|
|
|
*/
|
|
|
|
#ifndef GFX_COMPILER_NAME
|
|
|
|
#define GFX_COMPILER_NAME "Unknown"
|
|
|
|
#warning "You are using an unknown compiler. Please report this on the ugfx forum"
|
|
|
|
#endif
|
2017-06-30 09:43:51 +00:00
|
|
|
#if GFX_SHOW_COMPILER && GFX_DISPLAY_RULE_WARNINGS
|
|
|
|
#if GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_MACRO
|
|
|
|
COMPILER_WARNING(GFXSTRX(Compiler: GFX_COMPILER_NAME))
|
|