This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
streambuf compilation problem
- To: libstdc++ at gcc dot gnu dot org
- Subject: streambuf compilation problem
- From: Craig Rodrigues <rodrigc at mediaone dot net>
- Date: Sat, 10 Feb 2001 16:25:44 -0500
Hi,
I am using:
% g++ -v
Reading specs from /usr/local/bin/../lib/gcc-lib/i386-pc-linux-gnu/2.97/specs
Configured with: ../configure --prefix=/tmp/gcc-20010210-root/usr/local --enable-shared --enable-threads --disable-checking i386-pc-linux-gnu : (reconfigured)
gcc version 2.97 20010210 (experimental)
under Redhat Linux 7.0.
The attached test program fails compilation with the following error:
a.cc:7: conflicting return type specified for `virtual int mybuf::underflow()'
/usr/local/include/g++-v3/bits/std_streambuf.h:475: overriding `typename
_Traits::int_type std::basic_streambuf<_CharT, _Traits>::underflow() [with
_CharT = char, _Traits = std::char_traits<char>]'
Is this a problem in libstdc++?
--
Craig Rodrigues
http://www.gis.net/~craigr
rodrigc@mediaone.net
#include <iostream>
using namespace std;
class mybuf : public streambuf
{
protected:
virtual int underflow();
};
int
mybuf::underflow()
{
return 0;
}
int main(int, char **) { return 0; }