This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/26458] Passing a NULL char* into output stream now breaks the output stream



------- Comment #1 from pcarlini at suse dot de  2006-02-24 16:53 -------
The change is certainly intended and the important point is that is not true
that there is no indication of the failure, quite to the contrary the badbit is
set. Try changing your test like this:

  char *str = NULL;
  cout << "Hello " << str;

  assert( !cout.good() );
  cout.clear();

  cout << " there" << endl;

  assert( cout.good() );

  cout << "still dead?" << endl;

  assert( cout.good() );


-- 

pcarlini at suse dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
          Component|c++                         |libstdc++
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26458


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]