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]

libstdc++/6672: <fstream> header produces errors



>Number:         6672
>Category:       libstdc++
>Synopsis:       <fstream> header produces errors
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu May 16 01:56:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Bernd Strieder
>Release:        3.1
>Organization:
>Environment:
Linux 2.4 i686
>Description:
The following file compiles with releases gcc-2.95.3 and snapshot gcc-20020513,
but not with gcc-3.1.

#include <fstream>

int main(void)
{
  std::fstream file ("fstreamtest.txt", std::ios::out);

  file << "Test";

}

The bug occurs in file

..gcc/include/g++-v3/bits/basic_file.h

  template<typename _CharT>
    class __basic_file_base: public __c_file_type
    {

__c_file_type is unknown producing a parse error before {

>How-To-Repeat:
Just compile like

g++ -g -O2    fstreamt.cc   -o fstreamt

In file included from /net/bernd/gcc/include/g++-v3/fstream:48,
                 from fstreamt.cc:1:
/net/bernd/gcc/include/g++-v3/bits/basic_file.h:52: parse error before `{'
   token
... subsequent messages omitted

>Fix:
not known

It seems to be recently introduced, since last
snapshot worked.
>Release-Note:
>Audit-Trail:
>Unformatted:


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