summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inline.h9
-rw-r--r--perl.h2
2 files changed, 3 insertions, 8 deletions
diff --git a/inline.h b/inline.h
index 619c79ee7c..57275d414e 100644
--- a/inline.h
+++ b/inline.h
@@ -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 ------------------------------- */
diff --git a/perl.h b/perl.h
index ee333d1369..3c2e4e4cb0 100644
--- a/perl.h
+++ b/perl.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)