diff options
-rw-r--r-- | inline.h | 9 | ||||
-rw-r--r-- | perl.h | 2 |
2 files changed, 3 insertions, 8 deletions
@@ -188,18 +188,13 @@ S_sv_or_pv_pos_u2b(pTHX_ SV *sv, const char *pv, STRLEN pos, STRLEN *lenp) /* ------------------------------- handy.h ------------------------------- */ /* saves machine code for a common noreturn idiom typically used in Newx*() */ -#ifdef __clang__ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunused-function" -#endif +GCC_DIAG_IGNORE(-Wunused-function) static void S_croak_memory_wrap(void) { Perl_croak_nocontext("%s",PL_memory_wrap); } -#ifdef __clang__ -#pragma clang diagnostic pop -#endif +GCC_DIAG_RESTORE; /* ------------------------------- utf8.h ------------------------------- */ @@ -386,7 +386,7 @@ * clang only pretends to be GCC 4.2, but still supports push/pop. */ -#if defined(__clang) || \ +#if defined(__clang__) || defined(__clang) || \ (defined( __GNUC__) && ((__GNUC__ * 100) + __GNUC_MINOR__) >= 406) # define GCC_DIAG_DO_PRAGMA_(x) _Pragma (#x) |