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]

Re: libstdc++/6750: ofstream incorrectly sets failbit (severe regression)


Synopsis: ofstream incorrectly sets failbit (severe regression)

Responsible-Changed-From-To: unassigned->bkoz
Responsible-Changed-By: bkoz
Responsible-Changed-When: Thu May 23 07:55:12 2002
Responsible-Changed-Why:
    Mine.
State-Changed-From-To: analyzed->feedback
State-Changed-By: bkoz
State-Changed-When: Thu May 23 07:55:12 2002
State-Changed-Why:
    Peter, I appreciate this bug report. Have you looked at libstdc++/6518?
    
    
    #include <iostream>
    
    int main()
    {
      char* pt = NULL;
      std::cout << pt << std::endl;
      return 0;
    }
    
    This no longer cores, but it does set bad bit. You seem to think that setting badbit is not good. Well then, what? Throw an exception (which was suggested on the reflector list, but I think compatibility with streambuf* NULL is a better fit.) Do you agree that this is unspecified behavior? 
    
    -benjamin

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6750


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