[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 --- 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 cout.clear()

[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 --- 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;?

[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 --- (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 compiler? I think it is

[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 --- "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 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---