[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
c32_apply_type_test: Fix compilation error with GCC < 9
|
From: |
Bruno Haible |
|
Subject: |
c32_apply_type_test: Fix compilation error with GCC < 9 |
|
Date: |
Sat, 15 Jul 2023 09:47:41 +0200 |
The continuous integration found this compilation error, that occurs with GCC
versionx 8.x and older:
./uchar.h:1055:1: error: nonnull argument references non-pointer operand
(argument 1, operand 2)
This patch fixes it.
2023-07-15 Bruno Haible <bruno@clisp.org>
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.
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)
| [Prev in Thread] |
Current Thread |
[Next in Thread] |
- c32_apply_type_test: Fix compilation error with GCC < 9,
Bruno Haible <=