From fa16c36d952b4e40b29c35512a17ae3442a3fecb Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Wed, 16 May 2018 21:46:41 -0700 Subject: [PATCH] win: suppress clang reserved-id-macro warning when setting _WIN32_WINNT --- src/win.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/win.h b/src/win.h index 410b48c..a31654e 100644 --- a/src/win.h +++ b/src/win.h @@ -5,6 +5,11 @@ #define WIN32_LEAN_AND_MEAN #endif +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wreserved-id-macro" +#endif + #if defined(_WIN32_WINNT) && _WIN32_WINNT < 0x0600 #undef _WIN32_WINNT #endif @@ -13,6 +18,10 @@ #define _WIN32_WINNT 0x0600 #endif +#ifdef __clang__ +#pragma clang diagnostic pop +#endif + #ifndef __GNUC__ #pragma warning(push, 1) #endif