Why do you think this is a bug?
POSIX 10031-2017 standard says:
In the error section, we can read that it can return the same errors
(in errno) as fputc, which itself says, as for errors:
[EBADF] The file descriptor underlying stream is not a valid file
descriptor open for writing.
|Location:||Huddersfield, West Yorkshire, UK|
|Nodes:||8 (1 / 7)|