Simplify definition of compiler-specific macros

Remove conditionals for older compiler versions that aren't
supported by EPICS Base anymore.
This commit is contained in:
Martin Konrad
2019-11-12 13:35:49 -05:00
committed by Michael Davidsaver
parent 156b137af0
commit 13234afc40
2 changed files with 7 additions and 28 deletions
@@ -24,11 +24,7 @@
# error compiler/gcc/compilerSpecific.h is not for use with the clang compiler
#endif
#if __GNUC__ > 2
# define EPICS_ALWAYS_INLINE __inline__ __attribute__((always_inline))
#else
# define EPICS_ALWAYS_INLINE __inline__
#endif
#define EPICS_ALWAYS_INLINE __inline__ __attribute__((always_inline))
/* Expands to a 'const char*' which describes the name of the current function scope */
#define EPICS_FUNCTION __PRETTY_FUNCTION__
@@ -46,14 +42,8 @@
* CXX_PLACEMENT_DELETE - defined if compiler supports placement delete
* CXX_THROW_SPECIFICATION - defined if compiler supports throw specification
*/
#if __GNUC__ > 2 || ( __GNUC__ == 2 && __GNUC_MINOR__ >= 95 )
# define CXX_THROW_SPECIFICATION
#endif
#if __GNUC__ > 2 || ( __GNUC__ == 2 && __GNUC_MINOR__ >= 96 )
# define CXX_PLACEMENT_DELETE
#endif
#define CXX_THROW_SPECIFICATION
#define CXX_PLACEMENT_DELETE
#endif /* __cplusplus */
@@ -63,11 +53,9 @@
#define EPICS_PRINTF_STYLE(f,a) __attribute__((format(__printf__,f,a)))
/*
* Deprecation marker if possible
* Deprecation marker
*/
#if (__GNUC__ > 2)
# define EPICS_DEPRECATED __attribute__((deprecated))
#endif
#define EPICS_DEPRECATED __attribute__((deprecated))
/*
* Unused marker
@@ -20,11 +20,7 @@
# error compiler/msvc/compilerSpecific.h is only for use with the Microsoft compiler
#endif
#if _MSC_VER >= 1200
#define EPICS_ALWAYS_INLINE __forceinline
#else
#define EPICS_ALWAYS_INLINE __inline
#endif
/* Expands to a 'const char*' which describes the name of the current function scope */
#define EPICS_FUNCTION __FUNCTION__
@@ -42,13 +38,8 @@
* CXX_PLACEMENT_DELETE - defined if compiler supports placement delete
* CXX_THROW_SPECIFICATION - defined if compiler supports throw specification
*/
#if _MSC_VER >= 1200 /* visual studio 6.0 or later */
# define CXX_PLACEMENT_DELETE
#endif
#if _MSC_VER > 1300 /* some release after visual studio 7 we hope */
# define CXX_THROW_SPECIFICATION
#endif
#define CXX_PLACEMENT_DELETE
#define CXX_THROW_SPECIFICATION
#endif /* __cplusplus */