提交 d0040e23 编写于 作者: R Rich Felker

improve iswdigit macro to diagnose errors

this is analogous to commit 2ca55a93
for the macros in ctype.h.
上级 7fe273b2
......@@ -175,7 +175,7 @@ wctype_t wctype(const char *);
#ifndef __cplusplus
#undef iswdigit
#define iswdigit(a) ((unsigned)(a)-'0' < 10)
#define iswdigit(a) (0 ? iswdigit(a) : ((unsigned)(a)-'0') < 10)
#endif
#endif
......
......@@ -45,7 +45,7 @@ wctype_t wctype(const char *);
#ifndef __cplusplus
#undef iswdigit
#define iswdigit(a) (((unsigned)(a)-L'0') < 10)
#define iswdigit(a) (0 ? iswdigit(a) : ((unsigned)(a)-'0') < 10)
#endif
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册