[Bug c++/60959] Does “cout(char*)NULL” doing “close(1)” ?

2014-04-25 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60959 --- Comment #5 from Jonathan Wakely redi at gcc dot gnu.org --- Andrew is correct, the standard says: Requires: s shall not be a null pointer. So your program has undefined behaviour and should be fixed. You can clear the badbit with

[Bug c++/60959] Does “cout(char*)NULL” doing “close(1)” ?

2014-04-24 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60959 Andrew Pinski pinskia at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED

[Bug c++/60959] Does “cout(char*)NULL” doing “close(1)” ?

2014-04-24 Thread sree.gooogle at gmail dot com
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?

[Bug c++/60959] Does “cout(char*)NULL” doing “close(1)” ?

2014-04-24 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60959 --- Comment #3 from Andrew Pinski pinskia at gcc dot gnu.org --- (In reply to Sreenath U S from comment #2) 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

[Bug c++/60959] Does “cout(char*)NULL” doing “close(1)” ?

2014-04-24 Thread sree.gooogle at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60959 --- Comment #4 from Sreenath U S sree.gooogle at gmail dot com --- Okay Thanks. One more thing, Is there any way to make the remaining cout statements to get printed in gcc without removing the faulty cout(char*)NULL;?