[compiler,macros] fix pragma by compiler support

This commit is contained in:
akallabeth 2024-10-27 21:29:53 +01:00
parent 42178b6191
commit a60ac2321d
No known key found for this signature in database
GPG Key ID: A49454A3FC909FD5

View File

@ -74,8 +74,14 @@
_Pragma("clang diagnostic ignored \"-Wreserved-id-macro\"")
#define WINPR_PRAGMA_DIAG_IGNORED_UNUSED_MACRO \
_Pragma("clang diagnostic ignored \"-Wunused-macros\"")
#if __clang_major__ >= 13
#define WINPR_PRAGMA_DIAG_IGNORED_RESERVED_IDENTIFIER \
_Pragma("clang diagnostic ignored \"-Wreserved-identifier\"")
#else
#define WINPR_PRAGMA_DIAG_IGNORED_RESERVED_IDENTIFIER
#endif
#define WINPR_PRAGMA_DIAG_IGNORED_ATOMIC_SEQ_CST \
_Pragma("clang diagnostic ignored \"-Watomic-implicit-seq-cst\"")
#define WINPR_PRAGMA_DIAG_IGNORED_UNUSED_CONST_VAR \
@ -87,12 +93,15 @@
version \
3.9.0 \
*/
#define WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE \
_Pragma( \
"clang diagnostic ignored \"-Wtautological-value-range-compare\"") /** @since \
version \
3.10.0 \
*/
#if __clang_major__ >= 12
#define WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE \
_Pragma( \
"clang diagnostic ignored \"-Wtautological-value-range-compare\"") /** @since \
version 3.10.0 */
#else
#define WINPR_PRAGMA_DIAG_TAUTOLOGICAL_VALUE_RANGE_COMPARE
#endif
#define WINPR_PRAGMA_DIAG_IGNORED_FORMAT_NONLITERAL \
_Pragma("clang diagnostic ignored \"-Wformat-nonliteral\"") /** @since version 3.9.0 */
#define WINPR_PRAGMA_DIAG_IGNORED_MISMATCHED_DEALLOC /** @since version 3.3.0 */ /* not supported \