https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119011

--- Comment #26 from Vincent Lefèvre <vincent-gcc at vinc17 dot net> ---
(In reply to Alejandro Colomar from comment #25)
> I think the design of mbrtowc(3) could be improved.  It could have set errno
> to something different (maybe EINPROGRESS instead of returning -2?).

EINPROGRESS has a different meaning. But anyway, mbrtowc is already
standardized in ISO C. And forcing to use errno while a return code is
sufficient is a bad idea.

IMHO, such return codes should have names, so that instead of comparing with
literals -1 or -2, one could compare with these names. This would also improve
the code readability.

Reply via email to