Skip to content

Commit eeb9109

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

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
@@ -203,7 +203,10 @@ static void php_intl_idn_to(INTERNAL_FUNCTION_PARAMETERS,
203203
int32_t converted_ret_len;
204204

205205
status = U_ZERO_ERROR;
206-
#if (ZEND_GCC_VERSION >= 4002) && !defined(__clang__)
206+
#if defined(__clang__)
207+
# pragma clang diagnostic push
208+
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
209+
#elif ZEND_GCC_VERSION >= 4002
207210
# pragma GCC diagnostic push
208211
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
209212
#endif
@@ -212,7 +215,9 @@ static void php_intl_idn_to(INTERNAL_FUNCTION_PARAMETERS,
212215
} else {
213216
converted_ret_len = uidna_IDNToUnicode(ustring, ustring_len, converted, MAXPATHLEN, (int32_t)option, &parse_error, &status);
214217
}
215-
#if (ZEND_GCC_VERSION >= 4002) && !defined(__clang__)
218+
#if defined(__clang__)
219+
# pragma clang diagnostic pop
220+
#elif ZEND_GCC_VERSION >= 4002
216221
# pragma GCC diagnostic pop
217222
#endif
218223
efree(ustring);

0 commit comments

Comments
 (0)