From ef2e6079ba7c3f0b1c7678e093e9f713022bdef6 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Fri, 5 Feb 2016 13:30:26 -0600 Subject: [PATCH] Wrap WIN32 #pragma warning(disable) inside push/pop Exclude from MinGW, G++ doesn't understand these pragmas. --- src/misc/pv/epicsException.h | 9 ++++++--- src/pv/pvType.h | 12 +++++++++--- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/misc/pv/epicsException.h b/src/misc/pv/epicsException.h index a25279e..3ff925a 100644 --- a/src/misc/pv/epicsException.h +++ b/src/misc/pv/epicsException.h @@ -35,8 +35,6 @@ #define EPICSEXCEPTION_H_ #ifdef _WIN32 -#pragma warning( push ) -#pragma warning(disable: 4275) // warning C4275: non dll-interface class used as base for dll-interface class (std::logic_error) #endif #include @@ -67,6 +65,11 @@ # define EXCEPT_USE_NONE #endif +#if defined(_WIN32) && !defined(_MINGW) +#pragma warning( push ) +#pragma warning(disable: 4275) // warning C4275: non dll-interface class used as base for dll-interface class (std::logic_error) +#endif + namespace epics { namespace pvData { @@ -228,7 +231,7 @@ private: mutable std::string base_msg; }; -#ifdef _WIN32 +#if defined(_WIN32) && !defined(_MINGW) #pragma warning( pop ) #endif diff --git a/src/pv/pvType.h b/src/pv/pvType.h index 1a77ead..48bcc43 100644 --- a/src/pv/pvType.h +++ b/src/pv/pvType.h @@ -17,6 +17,10 @@ #ifdef _WIN32 #define NOMINMAX +#endif + +#if defined(_WIN32) && !defined(_MINGW) +#pragma warning( push ) #pragma warning(disable: 4251) #endif @@ -126,7 +130,9 @@ typedef std::vector::iterator StringArray_iterator; typedef std::vector::const_iterator StringArray_const_iterator; }} + +#if defined(_WIN32) && !defined(_MINGW) +#pragma warning( pop ) +#endif + #endif /* PVTYPE_H */ - - -