mirror of
https://github.com/ETLCPP/etl.git
synced 2026-11-09 14:49:53 +08:00
Replace ETL_COMPILER_ICCAVR by ETL_COMPILER_IAR. (#602)
The current definition mechanism for ETL_COMPILER_ICCAVR does not work. Both IAR compilers, for ARM and AVR define `__IAR_SYSTEMS_ICC__`. Thus `ETL_COMPILER_TYPE_DETECTED` will be defined in line before ETL_COMPILER_ICCAVR is defined. This switch will never be entered. Currently I see no reason for differentiating both compilers (`__ICCARM__` and `__ICCAVR__`). The condition for the IAR compiler platform (`__IAR_SYSTEMS_ICC__`) is sufficient (combined with <C++11 detection). At the moment ETL_COMPILER_ICCAVR is used as a switch condition for using `#pragma push_macro`. But actually IAR ARM and IAR AVR have no such macro defined. ETL_COMPILER_IAR is defined for both compilers. Thus the switch condition is replaced with ETL_COMPILER_IAR.
This commit is contained in:
parent
d31f787585
commit
24ebe3efe8
@ -32,7 +32,7 @@ SOFTWARE.
|
||||
* The header include guard has been intentionally omitted.
|
||||
* This file is intended to evaluated multiple times by design.
|
||||
*/
|
||||
#if !defined(ETL_COMPILER_GREEN_HILLS) && !defined(ETL_COMPILER_ICCAVR)
|
||||
#if !defined(ETL_COMPILER_GREEN_HILLS) && !defined(ETL_COMPILER_IAR)
|
||||
#if !defined(ETL_COMPILER_ARM5)
|
||||
#pragma pop_macro("min")
|
||||
#pragma pop_macro("max")
|
||||
|
||||
@ -33,7 +33,7 @@ SOFTWARE.
|
||||
* This file is intended to evaluated multiple times by design.
|
||||
*/
|
||||
|
||||
#if !defined(ETL_COMPILER_GREEN_HILLS) && !defined(ETL_COMPILER_ICCAVR)
|
||||
#if !defined(ETL_COMPILER_GREEN_HILLS) && !defined(ETL_COMPILER_IAR)
|
||||
#if !defined(ETL_COMPILER_ARM5)
|
||||
#pragma push_macro("min")
|
||||
#pragma push_macro("max")
|
||||
|
||||
@ -112,13 +112,6 @@ SOFTWARE.
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(ETL_COMPILER_TYPE_DETECTED) && !defined(ETL_COMPILER_ICCAVR)
|
||||
#if defined(__ICCAVR__)
|
||||
#define ETL_COMPILER_ICCAVR
|
||||
#define ETL_COMPILER_TYPE_DETECTED
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(ETL_COMPILER_TYPE_DETECTED) && !defined(ETL_COMPILER_MICROSOFT)
|
||||
#if defined(_MSC_VER)
|
||||
#define ETL_COMPILER_MICROSOFT
|
||||
@ -140,12 +133,6 @@ SOFTWARE.
|
||||
#define ETL_USING_GCC_COMPILER 0
|
||||
#endif
|
||||
|
||||
#if defined(ETL_COMPILER_ICCAVR)
|
||||
#define ETL_USING_ICCAVR_COMPILER 1
|
||||
#else
|
||||
#define ETL_USING_ICCAVR_COMPILER 0
|
||||
#endif
|
||||
|
||||
#if defined(ETL_COMPILER_MICROSOFT)
|
||||
#define ETL_USING_MICROSOFT_COMPILER 1
|
||||
#else
|
||||
|
||||
@ -37,9 +37,6 @@ SOFTWARE.
|
||||
#if defined(ETL_COMPILER_GCC)
|
||||
#define ETL_COMPILER_VERSION __GNUC__
|
||||
#define ETL_COMPILER_FULL_VERSION ((__GNUC__ * 10000) + (__GNUC_MINOR__ * 100) + __GNUC_PATCHLEVEL__)
|
||||
#elif defined(ETL_COMPILER_ICCAVR)
|
||||
#define ETL_COMPILER_VERSION __VER__
|
||||
#define ETL_COMPILER_FULL_VERSION __VER__
|
||||
#elif defined(ETL_COMPILER_MICROSOFT)
|
||||
#define ETL_COMPILER_VERSION _MSC_VER
|
||||
#define ETL_COMPILER_FULL_VERSION _MSC_FULL_VER
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user