http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60959
--- Comment #2 from Sreenath U S <sree.gooogle at gmail dot com> --- "sets the badbit on the stream which causes nothing to be printed after that."; So this is a defined behavior or it varies on compiler to compiler?