TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Conformance Should Mean Something – Fputc, and Freestanding

2 点作者 aw1621107大约 3 年前

1 comment

jepler大约 3 年前
I don't feel the need to, umm, defend what some implementation with CHAR_BIT of 16 or 32 actually does, but I do notice that if sizeof(int) == 1, then I think that (unsigned char)EOF == UCHAR_MAX. I think that unless sizeof(int) > 1, there is an unavoidable problem distinguishing between EOF and some valid character as written by fputc. Just changing the example to try to write (UCHAR_MAX - 1) at least avoids this possible 'excuse' for the behavior. good luck with the standards committee.
评论 #31091324 未加载