Does the standard require EOF to be negative?
问题 Is it written in the standard that EOF must be negative? On the contrary, WEOF is not required to be negative. Why? The situation for wchar_t must not be in any way different from ordinary char (except where automatic promotion from char to int plays the role), because defining wchar_t as char is perfectly fine with the standard. Therefore, similar rules must apply. Some quotations from glibc reference: if wchar_t is defined as char the type wint_t must be defined as int due to the parameter