public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pcarlini at suse dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/26458] Passing a NULL char* into output stream now breaks the output stream
Date: Fri, 24 Feb 2006 17:25:00 -0000	[thread overview]
Message-ID: <20060224165326.16624.qmail@sourceware.org> (raw)
In-Reply-To: <bug-26458-12260@http.gcc.gnu.org/bugzilla/>



------- 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


  reply	other threads:[~2006-02-24 16:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-24 16:53 [Bug c++/26458] New: " phil at mitre dot org
2006-02-24 17:25 ` pcarlini at suse dot de [this message]
2006-02-24 18:48 ` [Bug libstdc++/26458] " phil at mitre dot org
2006-02-24 18:55 ` phil at mitre dot org
2006-02-24 18:59 ` pinskia at gcc dot gnu dot org
2006-02-24 19:04 ` phil at mitre dot org
2006-02-24 20:40 ` pcarlini at suse dot de
2006-02-24 20:45 ` phil at mitre dot org
2006-02-24 21:04 ` pcarlini at suse dot de
2006-02-24 21:15 ` phil at mitre dot org
2006-02-24 21:32 ` pcarlini at suse dot de
     [not found] <bug-26458-4@http.gcc.gnu.org/bugzilla/>
2011-03-13  7:28 ` ian at airs dot com
2011-03-13 13:11 ` paolo.carlini at oracle dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060224165326.16624.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).