Skip to content

Commit c9d3194

Browse files
committed
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2: Suppress deprecation warning on IDNA2003 ICU methods for clang
2 parents 3107088 + ff7029b commit c9d3194

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

ext/intl/idn/idn.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,10 @@ static void php_intl_idn_to(INTERNAL_FUNCTION_PARAMETERS,
229229
int32_t converted_ret_len;
230230

231231
status = U_ZERO_ERROR;
232-
#if (ZEND_GCC_VERSION >= 4002) && !defined(__clang__)
232+
#if defined(__clang__)
233+
# pragma clang diagnostic push
234+
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
235+
#elif ZEND_GCC_VERSION >= 4002
233236
# pragma GCC diagnostic push
234237
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
235238
#endif
@@ -238,7 +241,9 @@ static void php_intl_idn_to(INTERNAL_FUNCTION_PARAMETERS,
238241
} else {
239242
converted_ret_len = uidna_IDNToUnicode(ustring, ustring_len, converted, MAXPATHLEN, (int32_t)option, &parse_error, &status);
240243
}
241-
#if (ZEND_GCC_VERSION >= 4002) && !defined(__clang__)
244+
#if defined(__clang__)
245+
# pragma clang diagnostic pop
246+
#elif ZEND_GCC_VERSION >= 4002
242247
# pragma GCC diagnostic pop
243248
#endif
244249
efree(ustring);

0 commit comments

Comments
 (0)