GCC Explorer - an interactive take on compilation
Posted Jun 3, 2012 16:29 UTC (Sun) by
lacos (subscriber, #70616)
In reply to:
GCC Explorer - an interactive take on compilation by cmccabe
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.
(
Log in to post comments)