public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/5314: compilation error
@ 2002-01-22 9:37 jason
0 siblings, 0 replies; 3+ messages in thread
From: jason @ 2002-01-22 9:37 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, jianhua.zhou, nobody
Synopsis: compilation error
State-Changed-From-To: analyzed->closed
State-Changed-By: jason
State-Changed-When: Tue Jan 22 09:37:10 2002
State-Changed-Why:
not a bug
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5314
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: c++/5314: compilation error
@ 2002-01-12 11:59 rodrigc
0 siblings, 0 replies; 3+ messages in thread
From: rodrigc @ 2002-01-12 11:59 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, jianhua.zhou, nobody
Synopsis: compilation error
State-Changed-From-To: open->analyzed
State-Changed-By: rodrigc
State-Changed-When: Sat Jan 12 11:59:22 2002
State-Changed-Why:
Even though this code example works with other
C++ compilers and older gcc versions, it does
not work with gcc 3.x, because the
constructor you are invoking on filebuf is not
part of the C++ standard.
Look at:
http://gcc.gnu.org/onlinedocs/libstdc++/17_intro/porting-howto.html
in the section, "3. stream::attach(int fd) is not in the standard any more"
In order to do what you want, look at the following
example from Josuttis:
http://www.josuttis.com/libbook/io/outbuf2.hpp.html
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5314
^ permalink raw reply [flat|nested] 3+ messages in thread
* c++/5314: compilation error
@ 2002-01-08 13:56 jianhua.zhou
0 siblings, 0 replies; 3+ messages in thread
From: jianhua.zhou @ 2002-01-08 13:56 UTC (permalink / raw)
To: gcc-gnats
>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:
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-01-22 17:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-22 9:37 c++/5314: compilation error jason
-- strict thread matches above, loose matches on Subject: below --
2002-01-12 11:59 rodrigc
2002-01-08 13:56 jianhua.zhou
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).