From 41e92b085aa543cba57610135168185632ed0799 Mon Sep 17 00:00:00 2001 From: Derek Lamberti Date: Tue, 21 Jan 2020 13:43:21 +0000 Subject: [PATCH] IVGCVSW-4364 Only apply deprecated attribute where available Change-Id: Ifde03ea6d9057db0949acad95560be8852c05f73 Signed-off-by: Derek Lamberti --- include/armnn/Deprecated.hpp | 10 +++++++++- include/armnn/Types.hpp | 4 ++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/include/armnn/Deprecated.hpp b/include/armnn/Deprecated.hpp index fbe0cf9..7387177 100644 --- a/include/armnn/Deprecated.hpp +++ b/include/armnn/Deprecated.hpp @@ -40,4 +40,12 @@ func; \ ARMNN_NO_DEPRECATE_WARN_END #define ARMNN_DEPRECATED [[deprecated]] -#define ARMNN_DEPRECATED_MSG(message) [[deprecated(message)]] \ No newline at end of file +#define ARMNN_DEPRECATED_MSG(message) [[deprecated(message)]] + +#if defined(__GNUC__) && (__GNUC__ <= 6) +# define ARMNN_DEPRECATED_ENUM +# define ARMNN_DEPRECATED_ENUM_MSG(message) +#else +# define ARMNN_DEPRECATED_ENUM ARMNN_DEPRECATED +# define ARMNN_DEPRECATED_ENUM_MSG(message) ARMNN_DEPRECATED_MSG(message) +#endif \ No newline at end of file diff --git a/include/armnn/Types.hpp b/include/armnn/Types.hpp index e5a7fc0..5ea214e 100644 --- a/include/armnn/Types.hpp +++ b/include/armnn/Types.hpp @@ -40,8 +40,8 @@ enum class DataType QuantizedSymm8PerAxis = 6, QSymmS8 = 7, - QuantisedAsymm8 ARMNN_DEPRECATED_MSG("Use DataType::QAsymmU8 instead.") = QAsymmU8, - QuantisedSymm16 ARMNN_DEPRECATED_MSG("Use DataType::QSymmS16 instead.") = QSymmS16 + QuantisedAsymm8 ARMNN_DEPRECATED_ENUM_MSG("Use DataType::QAsymmU8 instead.") = QAsymmU8, + QuantisedSymm16 ARMNN_DEPRECATED_ENUM_MSG("Use DataType::QSymmS16 instead.") = QSymmS16 }; enum class DataLayout -- 2.7.4