GCC Explorer - an interactive take on compilation
Posted Jun 3, 2012 16:29 UTC (Sun) by lacos
In reply to: GCC Explorer - an interactive take on compilation
Parent article: GCC Explorer - an interactive take on compilation
most people opt not to check the return value of writing to stdout, because they just don't care. There's nothing really wrong with that.
I disagree. stdout doesn't have to refer to a tty. It may have been redirected to a regular file.
I'm not arguing that every single fprintf() retval should be checked. But at least fflush()'s retval and the error indicator of the output stream should be checked (with ferror()) at reasonable places.
to post comments)