summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/intl/idn/idn.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/ext/intl/idn/idn.c b/ext/intl/idn/idn.c
index 877a27cbe8..60d7b829d8 100644
--- a/ext/intl/idn/idn.c
+++ b/ext/intl/idn/idn.c
@@ -223,7 +223,10 @@ static void php_intl_idn_to(INTERNAL_FUNCTION_PARAMETERS,
UParseError parse_error;
status = U_ZERO_ERROR;
-#if (ZEND_GCC_VERSION >= 4002) && !defined(__clang__)
+#if defined(__clang__)
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#elif ZEND_GCC_VERSION >= 4002
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
@@ -232,7 +235,9 @@ static void php_intl_idn_to(INTERNAL_FUNCTION_PARAMETERS,
} else {
converted_ret_len = uidna_IDNToUnicode(ustring, ustring_len, converted, MAXPATHLEN, (int32_t)option, &parse_error, &status);
}
-#if (ZEND_GCC_VERSION >= 4002) && !defined(__clang__)
+#if defined(__clang__)
+# pragma clang diagnostic pop
+#elif ZEND_GCC_VERSION >= 4002
# pragma GCC diagnostic pop
#endif
efree(ustring);