2 // Copyright © 2019 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
9 # define ARMNN_NO_CONVERSION_WARN_BEGIN \
10 _Pragma("GCC diagnostic push") \
11 _Pragma("GCC diagnostic ignored \"-Wconversion\"")
13 # define ARMNN_NO_CONVERSION_WARN_END \
14 _Pragma("GCC diagnostic pop")
17 # define ARMNN_NO_CONVERSION_WARN_BEGIN \
18 _Pragma("clang diagnostic push") \
19 _Pragma("clang diagnostic ignored \"-Wconversion\"")
21 # define ARMNN_NO_CONVERSION_WARN_END \
22 _Pragma("clang diagnostic pop")
24 #elif defined (_MSC_VER)
25 # define ARMNN_NO_CONVERSION_WARN_BEGIN \
26 __pragma(warning( push )) \
27 __pragma(warning(disable : 4101))
29 # define ARMNN_NO_CONVERSION_WARN_END \
30 __pragma(warning( pop ))
33 # define ARMNN_NO_CONVERSION_WARN_BEGIN
34 # define ARMNN_NO_CONVERSION_WARN_END
37 #define ARMNN_SUPRESS_CONVERSION_WARNING(func) \
38 ARMNN_NO_CONVERSION_WARN_BEGIN \
40 ARMNN_NO_CONVERSION_WARN_END