From 6237077198692fc6ab4b56c6700ee04a1b3c3672 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 15 Jul 2023 09:47:06 +0200 Subject: [PATCH] c32_apply_type_test: Fix compilation error with GCC < 9. * lib/uchar.in.h (c32_apply_type_test) [_GL_WCHAR_T_IS_UCS4]: Remove _GL_ARG_NONNULL attribute. --- ChangeLog | 6 ++++++ lib/uchar.in.h | 9 +++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 52b47d42c2..a38c75502e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2023-07-15 Bruno Haible + + c32_apply_type_test: Fix compilation error with GCC < 9. + * lib/uchar.in.h (c32_apply_type_test) [_GL_WCHAR_T_IS_UCS4]: Remove + _GL_ARG_NONNULL attribute. + 2023-07-13 Bruno Haible mbchar: Optimize is_basic. diff --git a/lib/uchar.in.h b/lib/uchar.in.h index eed6db3c54..1c2bd008f5 100644 --- a/lib/uchar.in.h +++ b/lib/uchar.in.h @@ -710,14 +710,19 @@ _GL_CXXALIASWARN (c32_get_type_test); This function is the counterpart of function 'iswctype' for wide characters. */ #if @GNULIB_C32_APPLY_TYPE_TEST@ -# if _GL_WCHAR_T_IS_UCS4 && !defined IN_C32_APPLY_TYPE_TEST +# if _GL_WCHAR_T_IS_UCS4 +# if !defined IN_C32_APPLY_TYPE_TEST _GL_BEGIN_C_LINKAGE -_GL_INLINE _GL_ARG_NONNULL ((2)) int +_GL_INLINE int c32_apply_type_test (wint_t wc, c32_type_test_t property) { return iswctype (wc, property); } _GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32_apply_type_test, int, + (wint_t wc, c32_type_test_t property)); +# endif # else _GL_FUNCDECL_SYS (c32_apply_type_test, int, (wint_t wc, c32_type_test_t property) -- 2.39.5