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()
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;?
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
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?
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60959
Andrew Pinski changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---