This is the mail archive of the gcc-prs@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++/4146: input, num_get, regression from 2.95

[Get raw message]
Synopsis: input, num_get, regression from 2.95

State-Changed-From-To: analyzed->feedback
State-Changed-By: bkoz
State-Changed-When: Fri Nov 30 18:29:28 2001
State-Changed-Why:
    Hey. I just examined this with current gcc-3.1 head. Sorry for the delay, by the way.
    
    You're right, it was very simple:
    
    in read_pdb_file, the ifstream is opened, read, closed, then re-opened. This is all fine, but the file is reopened without clearing error bits, thus failing to deal with the resulting data.
    
    On line 197 of my copy of these sources:
    
     pdb_file.open(pdb_file_name, std::ios::in);
      pdb_file.clear();   // XXX bkoz DR 22 need to clear eofbit.
      while (pdb_file >> dummy) 
     
    Adding the clear solves the problem....
    
    Anyway. Try this: it should solve your problem.
    
    I noticed that the output file is formatted a bit differently between gcc-2.96 and gcc-3.x:
    
    2.96:
    ATOM      2  CA  ASN   584    22.622  -18.771 28.061  1.00  30.76 
    
    gcc-3.x:
    ATOM      1  N   ASN   584      23.122 -19.077  26.733  1.00 31.16
    
    
    Notice the different spacing right before the floating poin type. I believe this is correct:
    
    align (right) << "    " // 4 spaces
    setwidth (8) << output 6-digit numeric type.
    
    Looks right to me.
    
    Here's hoping this solves your problem.

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


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