Fixed compilation in IAR Embedded Workbench (issue #515)

This commit is contained in:
Benoit Blanchon
2017-06-01 20:47:09 +02:00
parent c955049207
commit a2446f6c68
5 changed files with 110 additions and 81 deletions

View File

@@ -7,11 +7,14 @@
#pragma once
#ifdef _MSC_VER
#ifdef _MSC_VER // Visual Studio
#define FORCE_INLINE __forceinline
#define NO_INLINE __declspec(noinline)
#define DEPRECATED(msg) __declspec(deprecated(msg))
#else
#elif defined(__GNUC__) // GCC or Clang
#define FORCE_INLINE __attribute__((always_inline))
#define NO_INLINE __attribute__((noinline))
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
@@ -19,4 +22,11 @@
#else
#define DEPRECATED(msg) __attribute__((deprecated))
#endif
#else // Other compilers
#define FORCE_INLINE
#define NO_INLINE
#define DEPRECATED(msg)
#endif