Do not use __pragma when not compling with MS compiler

This commit is contained in:
Yevgen Muntyan 2015-12-30 01:30:47 -08:00
parent 21bece80e1
commit ef484fd180
2 changed files with 3 additions and 4 deletions

View File

@ -30,7 +30,7 @@
#if defined(MOO_CL_MSVC)
#define MOO_MSVC_WARNING_PUSH __pragma(warning(push))
#define MOO_MSVC_WARNING_POP __pragma(warning(push))
#define MOO_MSVC_WARNING_POP __pragma(warning(pop))
#define MOO_MSVC_WARNING_DISABLE(N) __pragma(warning(disable:N))
#define MOO_MSVC_WARNING_PUSH_DISABLE(N) MOO_MSVC_WARNING_PUSH MOO_MSVC_WARNING_DISABLE(N)
#else

View File

@ -26,10 +26,9 @@ G_BEGIN_DECLS
G_STMT_START
#define MOO_STMT_END \
__pragma(warning(push)) \
__pragma(warning(disable: 4127)) \
MOO_MSVC_WARNING_PUSH_DISABLE(4127) \
G_STMT_END \
__pragma(warning(pop))
MOO_MSVC_WARNING_POP
#ifdef __COUNTER__
#define _MOO_CODE_LOC_COUNTER (__COUNTER__ + 1)