This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
c++/5314: compilation error
- From: jianhua dot zhou at informix dot com
- To: gcc-gnats at gcc dot gnu dot org
- Date: 8 Jan 2002 21:55:31 -0000
- Subject: c++/5314: compilation error
- Reply-to: jianhua dot zhou at informix dot com
>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: