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]

c++/5314: compilation error



>Number:         5314
>Category:       c++
>Synopsis:       compilation error
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 08 13:56:02 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Jianhua Zhou
>Release:        g++ 3.0.3
>Organization:
>Environment:
RedHat 7.1
>Description:
The following code has compilation problem in g++ 3.0.3.
It is ok in other C++ compiler and g++ 2.9.1

#include <iostream.h>
#include <fstream.h>
main()
{
        filebuf x(1);
}

The output are:
zhou.cxx: In function `int main()':
zhou.cxx:5: no matching function for call to `std::basic_filebuf<char,
   std::char_traits<char> >::basic_filebuf(int)'
/usr/local/include/g++-v3/bits/std_iosfwd.h:78: candidates are:
   std::basic_filebuf<char, std::char_traits<char> >::basic_filebuf(const
   std::basic_filebuf<char, std::char_traits<char> >&)
/usr/local/include/g++-v3/bits/fstream.tcc:122:
   std::basic_filebuf<_CharT, _Traits>::basic_filebuf(std::__c_file_type*,
   std::_Ios_Openmode, typename _Traits::int_type = static_cast<typename
   _Traits::int_type>(8192)) [with _CharT = char, _Traits =
   std::char_traits<char>]
/usr/local/include/g++-v3/bits/fstream.tcc:114:
   std::basic_filebuf<_CharT, _Traits>::basic_filebuf() [with _CharT = char,
   _Traits = std::char_traits<char>]

>How-To-Repeat:
see Description.
>Fix:

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