fix CPP guard on clang pragmas

This commit is contained in:
Matthew Flatt 2013-12-31 06:49:20 -07:00
parent d3095f47da
commit 93b38e25a6
4 changed files with 9 additions and 7 deletions

View File

@ -172,7 +172,7 @@
# define INIT_JIT_ON 0 # define INIT_JIT_ON 0
#endif #endif
#ifdef __GNUC__ #ifdef __clang__
# ifdef MZ_PRECISE_GC # ifdef MZ_PRECISE_GC
# pragma clang diagnostic ignored "-Wself-assign" # pragma clang diagnostic ignored "-Wself-assign"
# endif # endif

View File

@ -157,7 +157,7 @@ static int check_dos_slashslash_qm(const char *next, int len, int *drive_end,
#define is_drive_letter(c) (((unsigned char)c < 128) && isalpha((unsigned char)c)) #define is_drive_letter(c) (((unsigned char)c < 128) && isalpha((unsigned char)c))
#ifdef __GNUC__ #ifdef __clang__
# ifdef MZ_PRECISE_GC # ifdef MZ_PRECISE_GC
# pragma clang diagnostic ignored "-Wtautological-compare" # pragma clang diagnostic ignored "-Wtautological-compare"
# endif # endif

View File

@ -31,10 +31,12 @@
#ifdef __GNUC__ #ifdef __GNUC__
#pragma GCC diagnostic ignored "-Waddress" #pragma GCC diagnostic ignored "-Waddress"
# ifdef MZ_PRECISE_GC #ifdef __clang__
# pragma clang diagnostic ignored "-Wtautological-compare" # ifdef MZ_PRECISE_GC
# pragma clang diagnostic ignored "-Wself-assign" # pragma clang diagnostic ignored "-Wtautological-compare"
# pragma clang diagnostic ignored "-Wconstant-logical-operand" # pragma clang diagnostic ignored "-Wself-assign"
# pragma clang diagnostic ignored "-Wconstant-logical-operand"
# endif
# endif # endif
#endif #endif

View File

@ -47,7 +47,7 @@
# include <malloc.h> # include <malloc.h>
#endif #endif
#ifdef __GNUC__ #ifdef __clang__
# ifdef MZ_PRECISE_GC # ifdef MZ_PRECISE_GC
# pragma clang diagnostic ignored "-Wself-assign" # pragma clang diagnostic ignored "-Wself-assign"
# endif # endif